Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update URLS #29

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/AUTHORIZATION.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ A token will be returned in `access_token` field in the return body, formatted l
"token_type": "bearer",
"expires_in": 43199,
"scope": "read:loans",
"iss": "https://auth-stage.dk1.kiva.org/",
"iss": "https://auth-stage.kiva.org/",
"partnerId": "7326",
"jti": "Qs4qoOJyC6vwkL1FoXORxfqwNis"
}
Expand Down
2 changes: 1 addition & 1 deletion portal/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

This website is built using [Docusaurus 2](https://docusaurus.io/), a modern static website generator. It contains
information to help our partners integrate
with [Kiva's Partner API](https://partner-api.k1.kiva.org/swagger-ui/#/partners).
with [Kiva's Partner API](https://partner-api.kiva.org/swagger-ui/#/partners).

## General Usage

Expand Down
5 changes: 4 additions & 1 deletion portal/docs/changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,10 @@ sidebar_position: 1

This changelog lists all additions and updates to the Kiva Partner API, in chronological order.

## October 14, 2021
## November 7, 2023
1. updated URLS to reflect changes in Kiva infrastructure

## October 14, 2023
1. Additional documentation on scopes and 403 errors.
2. Internally updated documentation ordering

Expand Down
10 changes: 5 additions & 5 deletions portal/docs/overview/authentication.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@ The new Partner API is accessible using an Oauth2 JWT obtained from Kiva’s aut
### Sample Request (test environment)

```json
1 curl --location --request POST 'https://auth-stage.dk1.kiva.org/oauth/token' \
1 curl --location --request POST 'https://auth-stage.kiva.org/oauth/token' \
2 --header 'Accept: application/json' \
3 --header 'Content-Type: application/x-www-form-urlencoded' \
4 --data-urlencode 'grant_type=client_credentials' \
5 --data-urlencode 'scope=create:loan_draft read:loans' \
6 --data-urlencode 'audience=https://partner-api-stage.dk1.kiva.org' \
6 --data-urlencode 'audience=https://partner-api-stage.kiva.org' \
7 --data-urlencode 'client_id=<client ID>' \
8 --data-urlencode 'client_secret=<client secret from Partner Admin>'
```
Expand All @@ -39,7 +39,7 @@ Scope identifies which APIs can be accessed. Use the following table to determi
| create:journal_update | https://partner-api.k1.kiva.org/v3/partner/{id}/journals |
| create:repayment | https://partner-api.k1.kiva.org/v3/partner/{id}/repayments |

Please refer to the [Swagger API documentation](https://partner-api-stage.dk1.kiva.org/swagger-ui/) for specifics on each API.
Please refer to the [Swagger API documentation](https://partner-api-stage.kiva.org/swagger-ui/) for specifics on each API.

### Response Data (test environment)
On successful authentication, you should receive a response like the following:
Expand All @@ -50,7 +50,7 @@ On successful authentication, you should receive a response like the following:
3 "token_type": "bearer",
4 "expires_in": 43199,
5 "scope": "create:loan_draft read:loans",
6 "iss": "https://auth.stage.dk1.kiva.org/",
6 "iss": "https://auth.stage.kiva.org/",
7 "partnerId": "1",
8 "jti": "RUsivUXGghhx-Yv9zza3ggZi6ao"
9 }
Expand All @@ -74,6 +74,6 @@ Insert the unique bearer token you received.
Once you have an account created by a Kiva admin you can login into the management [website](https://partners.kiva.org/pa3/partner/145/api).

```
curl --location --request GET 'https://partner-api-stage.dk1.kiva.org/v3/partner/PARTNERID/loans' \
curl --location --request GET 'https://partner-api-stage.kiva.org/v3/partner/PARTNERID/loans' \
--header 'Authorization: Bearer eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCIsImtpZCI6IjFublhjRFRHIn0.eyJhdWQiOlsiaHR0cHM6Ly9wYXJ0bmVyLWFwaS5rMS5raXZhLm9yZyJdLCJzY29wZSI6WyJjcmVhdGU6bG9hbl9kcmFmdCIsInJlYWQ6bG9hbnMiXSwiaXNzIjoiaHR0cHM6Ly9hdXRoLmsxLmtpdmEub3JnLyIsInBhcnRuZXJJZCI6IjEiLCJleHAiOjE2MDIyMjA0MTYsImp0aSI6IlpldUt0WTZXQU5VU2lWai1EZTVtZE5nRnFGSSIsImNsaWVudF9pZCI6IlFEMmxPRzZMbTN2RWQ5QTZEdVh3eFJWOE1OMEp6cDVreSJ9.mdOHScBFzkKribTjFCfUG_BrzrDELFgznvp7OPwDvE_-dOZ-qbSR0IoItgw9Nzsgv13pY0MOM8euEzHThvaxi8gtr1WV0MY4TCE3ffgApaUo_-uC5cXu1NoMPjToE53kHthRmv4cWOu_ycFYMvPV606U24Jsgs1txNrobu_ZlUsaFpyPN-9Pr1wq8N0VQWOS9qt_lkKB0aJhbMHsNOHysTXTclkGh2jbXKj10H5LnXBQsh-UpLSKCw3UoMlepR4tjRxyXnSYLgZ80jTPSsOU1oKkAYdLRSbUHEM4g30FfZ8__kUI7LNtlmuVWYNV3ZVn0yxLO1wSu4n31TsIZUX_Ag
```
4 changes: 2 additions & 2 deletions portal/docs/overview/draftloans.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,5 +79,5 @@ To check if the JSON document you created is correct, you can use an online JSON

## Technical documentation
All of Kiva's technical documentation, including endpoints, can be found here:
* Test environment (Stage): https://partner-api-stage.dk1.kiva.org/swagger-ui/
* Production (to use after testing): https://partner-api.k1.kiva.org/swagger-ui/
* Test environment (Stage): https://partner-api-stage.kiva.org/swagger-ui/
* Production (to use after testing): https://partner-api.kiva.org/swagger-ui/
6 changes: 3 additions & 3 deletions portal/docs/overview/fetch_loans.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ sidebar_position: 5
# Using the API loans fetch endpoint

## Process
The loan data stored in PA2 can be fetched via the API. See our Swagger documentation for more details: [GET /v3/partner/{id}/loans](https://partner-api-stage.dk1.kiva.org/swagger-ui/#/partners/loansRouteUsingGET)
The loan data stored in PA2 can be fetched via the API. See our Swagger documentation for more details: [GET /v3/partner/{id}/loans](https://partner-api-stage.kiva.org/swagger-ui/#/partners/loansRouteUsingGET)

There are 4 search request parameters you can send: `query`, `status`, `offset`, and `limit`.

Expand All @@ -30,5 +30,5 @@ After making the request, the response from the API will be returned in JSON for

## Technical documentation
All of Kiva's technical documentation, including endpoints, can be found here:
Test environment (Stage): https://partner-api-stage.dk1.kiva.org/swagger-ui/
Production (to use after testing): https://partner-api.k1.kiva.org/swagger-ui/
Test environment (Stage): https://partner-api-stage.kiva.org/swagger-ui/
Production (to use after testing): https://partner-api.kiva.org/swagger-ui/
4 changes: 2 additions & 2 deletions portal/docs/overview/post_journals.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,5 +28,5 @@ The content of the journal can be whatever you'd like it to be.

## Technical documentation
All of Kiva's technical documentation, including endpoints, can be found here:
* Test environment (Stage): https://partner-api-stage.dk1.kiva.org/swagger-ui/
* Production (to use after testing): https://partner-api.k1.kiva.org/swagger-ui/
* Test environment (Stage): https://partner-api-stage.kiva.org/swagger-ui/
* Production (to use after testing): https://partner-api.kiva.org/swagger-ui/
4 changes: 2 additions & 2 deletions portal/docs/overview/report_payments.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,5 +23,5 @@ To check if the JSON format you created is correct, you can use an online JSON v

## Technical documentation
All of Kiva's technical documentation, including endpoints, can be found here:
* Test environment (Stage): https://partner-api-stage.dk1.kiva.org/swagger-ui/
* Production (to use after testing): https://partner-api.k1.kiva.org/swagger-ui/
* Test environment (Stage): https://partner-api-stage.kiva.org/swagger-ui/
* Production (to use after testing): https://partner-api.kiva.org/swagger-ui/
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,12 @@ Se puede acceder a la nueva API de socios mediante un Oauth2 JWT obtenido del se
### Solicitud de muestra (entorno de prueba)

```json
1 curl --location --request POST 'https://auth-stage.dk1.kiva.org/oauth/token' \
1 curl --location --request POST 'https://auth-stage.kiva.org/oauth/token' \
2 --header 'Accept: application/json' \
3 --header 'Content-Type: application/x-www-form-urlencoded' \
4 --data-urlencode 'grant_type=client_credentials' \
5 --data-urlencode 'scope=create:loan_draft read:loans' \
6 --data-urlencode 'audience=https://partner-api-stage.dk1.kiva.org' \
6 --data-urlencode 'audience=https://partner-api-stage.kiva.org' \
7 --data-urlencode 'client_id=<client ID>' \
8 --data-urlencode 'client_secret=<client secret from Partner Admin>'
```
Expand All @@ -32,14 +32,14 @@ Se puede acceder a la nueva API de socios mediante un Oauth2 JWT obtenido del se

Scope (Campo de aplicación) identifica a qué APIs se puede acceder. Utilice la siguiente tabla para determinar qué campos de aplicación (Scopes) incluir:

| Scope (Alcance Operativo) | API |
|------------------------------------------------------------|--------------------------------------------------------------------------|
| read:loans | https://partner-api.k1.kiva.org/v3/partner/{id}/loans?limit=20&offset=0 |
| create:loan_draft | https://partner-api.k1.kiva.org/v3/partner/{id}/loan_draft |
| create:journal_update | https://partner-api.k1.kiva.org/v3/partner/{id}/journals |
| create:repayment | https://partner-api.k1.kiva.org/v3/partner/{id}/repayments |
| Scope (Alcance Operativo) | API |
|------------------------------------------------------------|-------------------------------------------------------------------------|
| read:loans | https://partner-api.kiva.org/v3/partner/{id}/loans?limit=20&offset=0 |
| create:loan_draft | https://partner-api.kiva.org/v3/partner/{id}/loan_draft |
| create:journal_update | https://partner-api.kiva.org/v3/partner/{id}/journals |
| create:repayment | https://partner-api.kiva.org/v3/partner/{id}/repayments |

Consulte [la documentación de la API en Swagger](https://partner-api-stage.dk1.kiva.org/swagger-ui/) para obtener información específica sobre cada API.
Consulte [la documentación de la API en Swagger](https://partner-api-stage.kiva.org/swagger-ui/) para obtener información específica sobre cada API.

### Datos de respuesta (entorno de prueba)
Si la autenticación es exitosa, debería recibir una respuesta como la siguiente:
Expand All @@ -50,7 +50,7 @@ Si la autenticación es exitosa, debería recibir una respuesta como la siguient
3 "token_type": "bearer",
4 "expires_in": 43199,
5 "scope": "create:loan_draft read:loans",
6 "iss": "https://auth.stage.dk1.kiva.org/",
6 "iss": "https://auth.stage.kiva.org/",
7 "partnerId": "1",
8 "jti": "RUsivUXGghhx-Yv9zza3ggZi6ao"
9 }
Expand All @@ -71,6 +71,6 @@ Una vez que haya recibido un token de acceso, introdúzcalo como token de portad
2. Inserte el token único al portador que recibió.

```
curl --location --request GET 'https://partner-api-stage.dk1.kiva.org/v3/partner/PARTNERID/loans' \
curl --location --request GET 'https://partner-api-stage.kiva.org/v3/partner/PARTNERID/loans' \
--header 'Authorization: Bearer eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCIsImtpZCI6IjFublhjRFRHIn0.eyJhdWQiOlsiaHR0cHM6Ly9wYXJ0bmVyLWFwaS5rMS5raXZhLm9yZyJdLCJzY29wZSI6WyJjcmVhdGU6bG9hbl9kcmFmdCIsInJlYWQ6bG9hbnMiXSwiaXNzIjoiaHR0cHM6Ly9hdXRoLmsxLmtpdmEub3JnLyIsInBhcnRuZXJJZCI6IjEiLCJleHAiOjE2MDIyMjA0MTYsImp0aSI6IlpldUt0WTZXQU5VU2lWai1EZTVtZE5nRnFGSSIsImNsaWVudF9pZCI6IlFEMmxPRzZMbTN2RWQ5QTZEdVh3eFJWOE1OMEp6cDVreSJ9.mdOHScBFzkKribTjFCfUG_BrzrDELFgznvp7OPwDvE_-dOZ-qbSR0IoItgw9Nzsgv13pY0MOM8euEzHThvaxi8gtr1WV0MY4TCE3ffgApaUo_-uC5cXu1NoMPjToE53kHthRmv4cWOu_ycFYMvPV606U24Jsgs1txNrobu_ZlUsaFpyPN-9Pr1wq8N0VQWOS9qt_lkKB0aJhbMHsNOHysTXTclkGh2jbXKj10H5LnXBQsh-UpLSKCw3UoMlepR4tjRxyXnSYLgZ80jTPSsOU1oKkAYdLRSbUHEM4g30FfZ8__kUI7LNtlmuVWYNV3ZVn0yxLO1wSu4n31TsIZUX_Ag
```
Original file line number Diff line number Diff line change
Expand Up @@ -70,5 +70,5 @@ Cuando se rellenan en el Borrador del Préstamo, estos campos aparecerán en PA2

## Documentación técnica
Toda la documentación técnica de Kiva, incluidos los puntos finales, puede encontrarse aquí:
* Entorno de pruebas (Stage): https://partner-api-stage.dk1.kiva.org/swagger-ui/
* Producción (para usar después de las pruebas):https://partner-api.k1.kiva.org/swagger-ui/
* Entorno de pruebas (Stage): https://partner-api-stage.kiva.org/swagger-ui/
* Producción (para usar después de las pruebas):https://partner-api.kiva.org/swagger-ui/
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ sidebar_position: 5

## Proceso

* Se envía una consulta de información a PA2 a través de la API, [GET /v3/partner/{id}/loans](https://partner-api-stage.dk1.kiva.org/swagger-ui/#/partners/loansRouteUsingGET).
* Se envía una consulta de información a PA2 a través de la API, [GET /v3/partner/{id}/loans](https://partner-api-stage.kiva.org/swagger-ui/#/partners/loansRouteUsingGET).
* Hay 4 parámetros de solicitud de búsqueda que puede enviar: query, status, offset y limit
* Query: puede ser cualquier línea que se escriba en la barra de búsqueda de PA2 (por ejemplo, nombre, ID de préstamo, ID de cliente o ID de Kiva)
* Status: puede ser uno de los siguientes:
Expand All @@ -28,6 +28,6 @@ sidebar_position: 5
## Documentación técnica

* Toda la documentación técnica de Kiva, incluyendo los puntos finales, se puede encontrar aquí:
* Entorno de pruebas (Stage): https://partner-api-stage.dk1.kiva.org/swagger-ui/
* Producción (para usar después de las pruebas): https://partner-api.k1.kiva.org/swagger-ui/
on (to use after testing): https://partner-api.k1.kiva.org/swagger-ui/
* Entorno de pruebas (Stage): https://partner-api-stage.kiva.org/swagger-ui/
* Producción (para usar después de las pruebas): https://partner-api.kiva.org/swagger-ui/
on (to use after testing): https://partner-api.kiva.org/swagger-ui/
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,5 @@ Recomendamos que su equipo técnico consulte al coordinador Kiva en su organizac

## Documentación técnica
Toda la documentación técnica de Kiva, incluidos los puntos finales, puede encontrarse aquí:
* Entorno de prueba (Stage): https://partner-api-stage.dk1.kiva.org/swagger-ui/
* Producción (Para usar después de las pruebas): https://partner-api.k1.kiva.org/swagger-ui/
* Entorno de prueba (Stage): https://partner-api-stage.kiva.org/swagger-ui/
* Producción (Para usar después de las pruebas): https://partner-api.kiva.org/swagger-ui/
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,5 @@ Para comprobar si el formato JSON que ha creado es correcto, puede utilizar un v

## Documentación técnica
* Toda la documentación técnica de Kiva, incluidos los puntos finales, puede encontrarse aquí:
* Ambiente de prueba (Stage):https://partner-api-stage.dk1.kiva.org/swagger-ui/
* Producción (Para usar después de las pruebas): https://partner-api.k1.kiva.org/swagger-ui/
* Ambiente de prueba (Stage):https://partner-api-stage.kiva.org/swagger-ui/
* Producción (Para usar después de las pruebas): https://partner-api.kiva.org/swagger-ui/
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,12 @@ Il est possible d'accéder à la nouvelle API des partenaires via un Oauth2 JWT
### Demande d'échantillon (environnement de test)

```json
1 curl --location --request POST 'https://auth-stage.dk1.kiva.org/oauth/token' \
1 curl --location --request POST 'https://auth-stage.kiva.org/oauth/token' \
2 --header 'Accept: application/json' \
3 --header 'Content-Type: application/x-www-form-urlencoded' \
4 --data-urlencode 'grant_type=client_credentials' \
5 --data-urlencode 'scope=create:loan_draft read:loans' \
6 --data-urlencode 'audience=https://partner-api-stage.dk1.kiva.org' \
6 --data-urlencode 'audience=https://partner-api-stage.kiva.org' \
7 --data-urlencode 'client_id=<client ID>' \
8 --data-urlencode 'client_secret=<client secret from Partner Admin>'
```
Expand All @@ -32,14 +32,14 @@ Il est possible d'accéder à la nouvelle API des partenaires via un Oauth2 JWT

Le " Scope " (champ d'application) identifie les APIs auxquelles il est possible d'accéder. Utilisez le tableau suivant pour déterminer les champs d'application (Scopes) à inclure:

| Scope (Campo de aplicación) | API |
|------------------------------------------------------------|--------------------------------------------------------------------------|
| read:loans | https://partner-api.k1.kiva.org/v3/partner/{id}/loans?limit=20&offset=0 |
| create:loan_draft | https://partner-api.k1.kiva.org/v3/partner/{id}/loan_draft |
| create:journal_update | https://partner-api.k1.kiva.org/v3/partner/{id}/journals |
| create:repayment | https://partner-api.k1.kiva.org/v3/partner/{id}/repayments |
| Scope (Campo de aplicación) | API |
|------------------------------------------------------------|--------------------------------------------------------------|
| read:loans | https://partner-api.kiva.org/v3/partner/{id}/loans?limit=20&offset=0 |
| create:loan_draft | https://partner-api.kiva.org/v3/partner/{id}/loan_draft |
| create:journal_update | https://partner-api.kiva.org/v3/partner/{id}/journals |
| create:repayment | https://partner-api.kiva.org/v3/partner/{id}/repayments |

Consultez [la documentation de l'API dans Swagger](https://partner-api-stage.dk1.kiva.org/swagger-ui/) pour obtenir des informations spécifiques sur chaque API.
Consultez [la documentation de l'API dans Swagger](https://partner-api-stage.kiva.org/swagger-ui/) pour obtenir des informations spécifiques sur chaque API.

### Response Data (environnement de test)
Si l'authentification est correcte, vous devriez recevoir une réponse comme la suivante :
Expand All @@ -51,7 +51,7 @@ Si l'authentification est correcte, vous devriez recevoir une réponse comme la
3 "token_type": "bearer",
4 "expires_in": 43199,
5 "scope": "create:loan_draft read:loans",
6 "iss": "https://auth.stage.dk1.kiva.org/",
6 "iss": "https://auth.stage.kiva.org/",
7 "partnerId": "1",
8 "jti": "RUsivUXGghhx-Yv9zza3ggZi6ao"
9 }
Expand All @@ -72,6 +72,6 @@ Une fois que vous avez reçu un token d'accès, entrez-le comme token porteur da
2. Insérez le token unique au porteur que vous avez reçu.

```
curl --location --request GET 'https://partner-api-stage.dk1.kiva.org/v3/partner/PARTNERID/loans' \
curl --location --request GET 'https://partner-api-stage.kiva.org/v3/partner/PARTNERID/loans' \
--header 'Authorization: Bearer eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCIsImtpZCI6IjFublhjRFRHIn0.eyJhdWQiOlsiaHR0cHM6Ly9wYXJ0bmVyLWFwaS5rMS5raXZhLm9yZyJdLCJzY29wZSI6WyJjcmVhdGU6bG9hbl9kcmFmdCIsInJlYWQ6bG9hbnMiXSwiaXNzIjoiaHR0cHM6Ly9hdXRoLmsxLmtpdmEub3JnLyIsInBhcnRuZXJJZCI6IjEiLCJleHAiOjE2MDIyMjA0MTYsImp0aSI6IlpldUt0WTZXQU5VU2lWai1EZTVtZE5nRnFGSSIsImNsaWVudF9pZCI6IlFEMmxPRzZMbTN2RWQ5QTZEdVh3eFJWOE1OMEp6cDVreSJ9.mdOHScBFzkKribTjFCfUG_BrzrDELFgznvp7OPwDvE_-dOZ-qbSR0IoItgw9Nzsgv13pY0MOM8euEzHThvaxi8gtr1WV0MY4TCE3ffgApaUo_-uC5cXu1NoMPjToE53kHthRmv4cWOu_ycFYMvPV606U24Jsgs1txNrobu_ZlUsaFpyPN-9Pr1wq8N0VQWOS9qt_lkKB0aJhbMHsNOHysTXTclkGh2jbXKj10H5LnXBQsh-UpLSKCw3UoMlepR4tjRxyXnSYLgZ80jTPSsOU1oKkAYdLRSbUHEM4g30FfZ8__kUI7LNtlmuVWYNV3ZVn0yxLO1wSu4n31TsIZUX_Ag
```
Original file line number Diff line number Diff line change
Expand Up @@ -65,5 +65,5 @@ Lorsqu'ils sont renseignés dans Leprojets de crédit, ces champs s'affichent su

## Documentation technique
Toda la documentación técnica de Kiva, incluidos los puntos finales, puede encontrarse aquí:
* Environnement de test (Stage) https://partner-api-stage.dk1.kiva.org/swagger-ui/
* Production (à utiliser après les tests) https://partner-api.k1.kiva.org/swagger-ui/
* Environnement de test (Stage) https://partner-api-stage.kiva.org/swagger-ui/
* Production (à utiliser après les tests) https://partner-api.kiva.org/swagger-ui/
Loading