The Shipping API comprises all the endpoints for creating shipments and retrieving data for your created shipments. You will also find endpoints to receive notifications about updates on the status of your shipments via a webhook.
When defining your integration, you will have the option to NOT use our card distribution service.
In that case, the affinity groups will reflect the settings you have chosen. Also, when creating a card or a batch of cards, we will return an identifier in the shipment_id
field, which we recommend you store in your integration, since you will need it for pick-up. The cards will be available for pick-up at the embossing facility specified in integration.
The /shipping/v1/
endpoint is used to create a new shipment for an unnamed card. Please note that in order to create a shipment, it is required that you have batch of unnamed cards created.
The region
field corresponds to:
The courier.tracking_url field of the response will be available once the shipment is reported by the corresponding logistics partner. Until then, it will have a null value
additional_info
no está disponible para su uso.zip_code
field is optional, i.e. you may choose not to submit it.additional_info
no está disponible para su uso.El campo additional_info
estará disponible únicamente para envíos que utilicen logística 99 Minutos.
Puedes asociar un envío con el usuario al que le enviarás la tarjeta especificando el user_id en el body del shipment.
The endpoint /shipping/v1/
enables searching for a group of cards based on the attributes specified.
You'll know how to apply filters and sort the shipments by following this documentation.
The possible sorting attributes are:
shipment_type
status
status_detail
created_at
The /shipping/v1/{shipment_id}
endpoint allows you to update the delivery address of a shipment.
Para actualizar la dirección de entrega, el envío debe tener como STATUS_DETAIL alguno de los siguientes valores según la transportadora:
Courier | Allowed states |
---|---|
99 MINUTOS | SHIPMENT_CONFIRMED, IN_WAREHOUSE, RECEIVED_BY_CARRIER, ROAD_TO_PICKUP, UNSUCCESSFUL_PICKUP |
ANDREANI | PENDING, END_OF_CUSTODY, DISTRIBUTION, WRONG_ADDRESS |
DOMINA | CALL_SCHEDULED, VISIT_SCHEDULED, CALL_FAILED_UNKNOWN, CLIENT_NOT_PRESENT, WRONG_ADDRESS, IN_TRANSIT, INCOMPLETE_ADDRESS, RECEIVED_BY_CARRIER, CALL_RESCHEDULED |
ESTAFETA | FAILED_DELIVERY_ATTEMPT |
FLASH | START_OF_CUSTODY |
You won't be able to create another change of address request for a shipment while one is pending.
To check the status of the request, you will need to interact with the endpoint Get shipment. In the request_status field
, you will see one of the following values:
If your request is rejected, you will continue to see the original shipping address.
The /shipping/v1/{shipment_id}
endpoint allows you to get information about a particular shipment.
Do you have any doubts regarding the shipment statuses? We explain the meaning of each one in our documentation.
You will need to specify the shipment_id to perform the query.
For shipments heading to a warehouse and for those within Mexico, we won't provide an external tracking ID. But no need to fret! We'll keep you updated on the shipment status through the Dashboard and also via webhooks.
The /shipping/v1/{shipment_id}/history endpoint allows you to get the history of states of a specific shipment.
Do you have any doubts regarding the shipment statuses? We explain the meaning of each one in our documentation.
You will need to specify the shipment_id to perform the query.
The list of events is ordered in ascending order by update date, i. e. the most recent status is at the end of the list.
You must include this endpoint in your service so that we can provide you with real-time updates on shipments.
If you have doubts about how to set up a webhook, visit our documentation.
Find more information about the shipment status in our documentation.
api-secret
to use if multiple api-key
and api-secret
pairs were configured.The /shipping/v1/{shipment_id}/receiver
endpoint allows you to request the data of the recipient who received the shipment.
You won't be able to create a request while there is a pending one for the same shipment_id.
To check the status of the request, you will need to interact with the endpoint Get shipment. In the request_status field
, you will see one of the following values:
To view the recipient's data of the card, interact again with the endpoint Get shipment and read the received_by field
located within courier_additional_info
.