PomeloEx.Cards.Issuing.Shipments (PomeloEx v0.1.0)

View Source

Card shipment management and tracking.

Handles the physical distribution of cards to cardholders, including shipment creation, address updates, delivery tracking, and real-time webhook notifications.

External shipments

If you choose not to use Pomelo's card distribution service, affinity groups will reflect your settings. The shipment_id returned when creating a card or batch is used for pickup at the embossing facility.

Summary

Functions

Change shipping data The /shipping/v1/{shipment_id} endpoint allows you to update the delivery address of a shipment.

Create Shipment 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.

Get Shipping The /shipping/v1/{shipment_id} endpoint allows you to get information about a particular shipment.

Get shipment history The /shipping/v1/{shipment_id}/history endpoint allows you to get the history of states of a specific shipment.

Request receiver data The /shipping/v1/{shipment_id}/receiver endpoint allows you to request the data of the recipient who received the shipment.

Search shipment The endpoint /shipping/v1/ enables searching for a group of cards based on the attributes specified.

Shipments notifications You must include this endpoint in your service so that we can provide you with real-time updates on shipments.

Functions

change_shipment_data(payload)

Change shipping data The /shipping/v1/{shipment_id} endpoint allows you to update the delivery address of a shipment.

Considerations To update the delivery address, the shipment must have one of the following values as STATUS_DETAIL depending on the carrier:

CourierAllowed states
99 MINUTOSSHIPMENT_CONFIRMED, IN_WAREHOUSE, RECEIVED_BY_CARRIER, ROAD_TO_PICKUP, UNSUCCESSFUL_PICKUP
ANDREANIPENDING, END_OF_CUSTODY, DISTRIBUTION, WRONG_ADDRESS
DOMINACALL_SCHEDULED, VISIT_SCHEDULED, CALL_FAILED_UNKNOWN, CLIENT_NOT_PRESENT, WRONG_ADDRESS, IN_TRANSIT, INCOMPLETE_ADDRESS, RECEIVED_BY_CARRIER, CALL_RESCHEDULED
ESTAFETAFAILED_DELIVERY_ATTEMPT
FLASHSTART_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:

  • PENDING_UPDATE_ADDRESS: waiting for the carrier's response.
  • CONFIRMED_UPDATE_ADDRESS: the carrier has confirmed the shipment's address change.
  • REJECTED_UPDATE_ADDRESS: the carrier has rejected the shipment's address change. If your request is rejected, you will continue to see the original shipping address.

create_shipment(payload)

Create Shipment 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.

Considerations# The region field corresponds to:

Province in Argentina

  • State in Brazil
  • State in Colombia
  • State in Mexico 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

For Brazil If you operate in Brazil, the taxIdentificationNumber is always mandatory. The fields 'documentNumber' and 'documentType' will not be required. You must also fill out the region field with the two-character UF code. Example: 'SP' for São Paulo

  • Rondônia (RO)
  • Acre (AC)
  • Amazonas (AM)
  • Roraima (RR)
  • Pará (PA)
  • Amapá (AP)
  • Tocantins (TO)
  • Maranhão (MA)
  • Piauí (PI)
  • Ceará (CE)
  • Rio Grande do Norte (RN)
  • Paraíba (PB)
  • Pernambuco (PE)
  • Alagoas (AL)
  • Sergipe (SE)
  • Bahia (BA)
  • Minas Gerais (MG)
  • Espírito Santo (ES)
  • Rio de Janeiro (RJ)
  • São Paulo (SP)
  • Paraná (PR)
  • Santa Catarina (SC)
  • Rio Grande do Sul (RS)
  • Mato Grosso do Sul (MS)
  • Mato Grosso (MT)
  • Goiás (GO)
  • Distrito Federal (DF) For Colombia If operating in Colombia, the zip_code field is optional, i.e. you may choose not to submit it.

Envio de tarjetas innominadas desde deposito Puedes asociar un envío con el usuario al que le enviarás la tarjeta especificando el user_id en el body del shipment.

get_shipment(payload)

Get Shipping 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.

Considerations You will need to specify the shipment_id to perform the query.

Shipments to a warehouse and in Mexican territory: 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.

get_shipment_history(payload)

Get shipment history 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.

Considerations 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.

request_receiver_data(payload)

Request receiver data The /shipping/v1/{shipment_id}/receiver endpoint allows you to request the data of the recipient who received the shipment.

Considerations# 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:

  • REQUESTED_RECEIVER_DATA: Waiting for the carrier to share the recipient's shipping data.
  • GOT_RECEIVER_DATA: The carrier has shared the recipient's shipping data with us.
  • MISSING_RECEIVER_DATA: The carrier could not share the shipment receiver data with us. 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.

search_shipment(payload)

Search 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

shipment_notifications(payload)

Shipments notifications 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.

Considerations

  • In the updates, we'll notify you if there are any changes regarding a shipment. Please note that you'll be responsible for fetching the shipment to check the updated status.
  • We expect a response in the 2XX range to ensure that you've received the notification. Otherwise, we'll resend it. Find more information about the shipment status in our documentation.