Rest API

We use a REST JSON API.

Check order_id

Validates if an order_id is valid and provides information about it.

URL: https://apurata.com/pos/client/inhouse-downpayment/v2/info?dni={dni}&order_id={order_id}

Optional paramters

order_amount # It is used to indicate the real order amount of a financing a client started with an approximated amount https://apurata.com/pos/client/inhouse-downpayment/v2/info?dni={dni}&order_id={order_id}&order_amount={order_amount}

Method: GET

Success Response:

Code: 200 OK
{
  order_id: [string],
  purchase_total: [float],
  billed_by_ecommerce: [bool],

  downpayment_amount: [float],
  downpayment_status: [string],    # "FULFILLED" | "PENDING"
  downpayment_channel: [string],   # "aCuotaz" | "Tienda"
}

If you provide the order_amount, the fields purchase_total and downpayment_amount of the response, will vary according to the amount provided.

Sample curl:

curl 'https://apurata.com/pos/client/inhouse-downpayment/v2/info?dni=14159265&order_id=1234567' \
  -H 'Authorization: Bearer 69a06d50c17e4267a18e84f8530d6asd'

Error Responses:

Code: 401 UNAUTHORIZED
{ error: "Wrong or missing client token" }

Code: 404 NOT FOUND
{ error: "Funding code does not exist or not active" }

Code: 400 BAD REQUEST
{ dni: "Error on dni format", order_id: "Error on order_id format" }

Test Data:

You can get a success response using the following data:

URL: 'https://apurata.com/pos/client/inhouse-downpayment/mock/info?dni=XXXXXXXX&order_id=XXXXXXX'
Auth token: 69a06d50c17e4267a18e84f8530d6asd
dni: 14159265
order_id: 1234567

Receive down payment and billing

Notify aCuotaz that the total down payment amount was received by the physical store. Also mark the funding code as billed. If you call this API several times, only the first one will have effect.

URL: https://apurata.com/pos/client/inhouse-downpayment/v2/paid-and-billed

Method: POST

Request body:

{
    dni: [string],
    ruc: [string],            # DNI or RUC can be sent to identify the operation
    order_id: [string]
}

Success Response:

Code: 200 OK

Sample curl:

curl 'https://apurata.com/pos/client/inhouse-downpayment/v2/paid-and-billed' \

  -H 'Authorization: Bearer 69a06d50c17e4267a18e84f8530d6asd' \
  -H 'Content-Type: application/json' \
  --data '{"dni": "14159265", "order_id": "1234567"}'

Error Responses:

Code: 401 UNAUTHORIZED
{ error: "Wrong or missing client token" }

Code: 404 NOT FOUND
{ error: "Funding code does not exist or not active" }

Code: 400 BAD REQUEST
{
    dni: "Error on dni format",
    order_id: "Error on order_id format"
}

Test Data:

You can get a success response using the following data:

URL: 'https://apurata.com/pos/client/inhouse-downpayment/mock/paid-and-billed'
Auth token: 69a06d50c17e4267a18e84f8530d6asd
dni: 14159265
order_id: 1234567