El API de ZRU utiliza métodos HTTP y una estructura RESTful de endpoint.
- La autenticación del API se realiza vía Header Authorization.
- Todas las peticiones se deben realizar en formato JSON, y las respuestas del API son en dicho formato.
El API de ZRU utiliza métodos HTTP y una estructura RESTful de endpoint.
curl -i -X GET \
https://api.zrupay.com/v1/product/ \
-H 'Authorization: YOUR_API_KEY_HERE'
{ "count": 0, "items_per_page": 0, "next": "string", "previous": "string", "results": [ { … } ] }
curl -i -X POST \
https://api.zrupay.com/v1/product/ \
-H 'Authorization: YOUR_API_KEY_HERE' \
-H 'Content-Type: application/json' \
-d '{
"name": "NAME",
"price": 15,
"product_id": "MERCHANT_PRODUCT_ID",
"description": "DESCRIPTION",
"extra": {
"MERCHANT_KEY": "MERCHANT_VALUE"
}
}'
{ "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "product_id": "string", "name": "string", "price": 0.1, "description": "string" }
curl -i -X GET \
'https://api.zrupay.com/v1/product/{product-id}/' \
-H 'Authorization: YOUR_API_KEY_HERE'
{ "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "product_id": "string", "name": "string", "price": 0.1, "description": "string" }
curl -i -X PATCH \
'https://api.zrupay.com/v1/product/{product-id}/' \
-H 'Authorization: YOUR_API_KEY_HERE' \
-H 'Content-Type: application/json' \
-d '{
"price": 18
}'
{ "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "product_id": "string", "name": "string", "price": 0.1, "description": "string" }
curl -i -X DELETE \
'https://api.zrupay.com/v1/product/{product-id}/' \
-H 'Authorization: YOUR_API_KEY_HERE'