Correos API
Esta página aún no está disponible en tu idioma.
Globe Pickup Points integrates with Correos (Spain) through Correos’ Preregister and Labels APIs. With this integration, you can:
- Export orders to Correos directly from Shopify
- Print shipping labels within Shopify, on a 10 × 15 cm label printer or on A4
- Ship by Paq Premium or Paq Estándar to addresses in mainland Spain and the Balearic Islands
- Ship to Correos post offices, rural service points and Citypaq lockers
- Collect cash on delivery (contra reembolso) in EUR at the address and at a post office
- Track parcels on Correos’ tracking page
Enabling Correos API integration
Section titled “Enabling Correos API integration”You need your own Correos contract and two applications with their client ID and client secret:
- an application in Correos ID (Correos Identidad)
- an application on Correos Developers (developers.correos.es), subscribed to the Preregister and Labels APIs
Your Correos Gestor Comercial gives you the contract number, the client number and the labeller code, and assigns the services to your Correos ID application.
- In your Shopify admin, open Globe Pickup Points and navigate to Shipping labels. Click Add carrier and select Correos.
- Enter the Correos ID client ID and Correos ID client secret of your Correos ID application. Globe uses them to get the access token for every call.
- Enter the Correos Developers client ID and Correos Developers client secret. You find them on developers.correos.es, in the account menu under Mis suscripciones.
- Enter your Contract number (up to 8 digits), Client number (up to 10 characters) and Labeller code, the 4-character código de etiquetador of your contract.
- Select the Product for AUTO: Paq Premium or Paq Estándar. The two products marked “product from the settings” ship with it. To use both, map your shipping methods to the Paq Premium and Paq Estándar types.
- Optionally, enter the parcel size: Default length in millimeters, Default width in millimeters and Default height in millimeters. Citypaq deliveries need it. See Parcel size.
- Fill in the sender, printed on every label: Sender company name or Sender name (at least one), Sender street, Sender ZIP (five digits) and Sender city. The address must be in mainland Spain or the Balearic Islands. Sender phone is optional: a Spanish number with 9 digits, starting with 6, 7, 8 or 9. Sender email is optional, up to 50 characters.
- For cash on delivery, enter the Sender IBAN (for COD) and select the Cash on delivery transfers: One transfer per parcel or Grouped transfers. See Cash on delivery (COD).
- Optionally, click Show advanced settings and set the Default weight (kg), used when an order has no weight.
- Configure fulfillment and tagging options as needed:
- Automatically fulfill orders: Never, Yes, send order shipped email with the tracking number or Yes, do not send order shipped email. When enabled, the order is fulfilled after export with the Correos package code, Correos as the carrier and a link to Correos’ tracking page.
- Automatically tag orders with tracking number adds the package code as an order tag.
- Custom tag after export adds your own tag after every successful export.
- Map your Shopify shipping methods to a Correos product. The mapping is optional. You can change the product for each order when you create the label.
The settings have no test environment. Every export preregisters a real shipment on Correos’ production system.
Products
Section titled “Products”| Product in Globe | Delivery |
|---|---|
| Correos (post office or Citypaq if selected, otherwise address; product from the settings) | To the post office or Citypaq the customer picked in checkout, otherwise to the address, with the Product for AUTO. Also used when no product is set. |
| Correos post office or Citypaq (product from the settings) | To the post office or Citypaq on the order, with the Product for AUTO. An order without one is refused. |
| Correos Paq Premium (post office or Citypaq if selected, otherwise address) | Paq Premium to the point the customer picked, otherwise to the address. |
| Correos Paq Estándar (post office or Citypaq if selected, otherwise address) | Paq Estándar to the point the customer picked, otherwise to the address. |
| Correos Paq Premium (address) | Paq Premium to the address, also when the order has a pickup point. |
| Correos Paq Estándar (address) | Paq Estándar to the address, also when the order has a pickup point. |
Correos enables products and delivery methods per contract. If your contract does not include one, Correos refuses the shipment: ask your Correos Gestor Comercial to add it, or choose another product.
Where Correos delivers
Section titled “Where Correos delivers”Every product ships within Spain, to mainland Spain and the Balearic Islands. An order to another country is not exported.
Parcels to the Canary Islands, Ceuta and Melilla need customs data, which Globe does not send. Such an order is not exported: create its label in your Correos customer area. This also applies to a post office or Citypaq there.
Customer notifications
Section titled “Customer notifications”Correos needs a way to reach the customer, depending on the delivery:
- Citypaq: a Spanish mobile number (9 digits starting with 6 or 7). Correos sends the Citypaq pickup code by SMS.
- Post office: an e-mail address or a Spanish mobile number. Correos tells the customer that the parcel is at the office.
- Address: an e-mail address or a Spanish phone number.
Phone numbers work with or without +34. Correos takes e-mail addresses of up to 50 characters. An order without the contact its delivery needs is not exported.
Exporting and printing labels
Section titled “Exporting and printing labels”You can export orders to Correos and print shipping labels directly from Shopify, either in bulk or individually. For the label workflow itself, see Creating shipping labels.
Exporting an order preregisters one Correos shipment with one package. Correos assigns the 23-character package code, which is the tracking number and the label’s barcode. Parcels are tracked at https://www.correos.es/es/es/herramientas/localizador/envios/detalle?tracking-number=<package code>. The Shopify order name is sent as the shipment and package reference.
The receiver is the name and the address on the order. Correos takes up to 40 characters for the name and surnames together, and up to 100 for the address; Globe cuts longer ones.
The parcel weight comes from the order. If the order has no weight, the Default weight (kg) is used. If neither is set, the order is not exported. Correos takes parcels up to 40 kg.
Globe sends the orders of a batch one after another. If Globe cannot tell whether Correos created a shipment, for example because Correos did not answer in time, the error asks you to check your Correos customer area before you create the label again. Globe then stops before the next order of the batch. The orders it did not send can be exported again safely. If Correos refuses your access, the remaining orders of the batch fail without another call.
Globe does not cancel Correos shipments. Creating the label for the same order again preregisters a second shipment; cancel the one you do not need in your Correos customer area. Only a shipment Globe could not save is cancelled at Correos by Globe.
The integration does not sync delivery statuses back to Shopify.
Parcel size
Section titled “Parcel size”Globe sends the same size, from Default length in millimeters, Default width in millimeters and Default height in millimeters, for every parcel. Globe turns the box so each side fits Correos’ limits.
| Delivery | Size |
|---|---|
| Citypaq | Required. At least 100 × 145 mm, up to 390 × 490 × 590 mm and 1470 mm in total. |
| Address and post office | Optional. Sent when it fits: at least 100 × 145 mm, up to 2400 mm a side and 3000 mm in total. Otherwise the parcel goes without dimensions. |
An order to a Citypaq is not exported without the size, or when the size does not fit a Citypaq. Ship it to the address or to a post office, or correct the default dimensions.
Pickup points
Section titled “Pickup points”The customer selects the point at checkout from the Correos pickup point provider; to offer Correos points, see Adding pickup point carriers. Globe sends Correos’ own code of the point:
- a post office or rural service point: 7 digits, for example
2828494 - a Citypaq locker: a letter, 7 digits and a letter, for example
A0001078D
An order with a point from another carrier’s network is not exported. It is never shipped to the customer’s address instead. Choose a Correos point with the Modify pickup point action, or use Correos Paq Premium (address) or Correos Paq Estándar (address). A Correos point without an office or Citypaq code on the order is refused the same way.
Correos refuses a post office or Citypaq it cannot deliver to. Choose another point with the Modify pickup point action, or ship the order to the address.
Cash on delivery (COD)
Section titled “Cash on delivery (COD)”Correos collects cash on delivery at the address and at a post office, in EUR only, up to 2499.99 EUR per parcel. Your Correos contract must include it. Globe sends the COD amount from the label panel. See Cash on delivery.
- Sender IBAN (for COD) is the account Correos pays the collected amounts to. Globe checks the IBAN; an order with cash on delivery is not exported without a valid one.
- Cash on delivery transfers sets how Correos transfers the amounts: One transfer per parcel or Grouped transfers. Ask Correos if you are not sure.
- At a Citypaq, Correos does not collect cash on delivery. Ship the order to the address or to a post office, or set the COD amount to 0 if the order is already paid.
- An order with a COD amount in a currency other than EUR is not exported.
Label printing
Section titled “Label printing”Correos labels can be printed in the following formats:
| Format | Labels |
|---|---|
| Label printer, 10x15 cm (A6) | Correos’ 141 × 100 mm label, turned upright onto a 10 × 15 cm page, not scaled. One label per page. |
| A4 (Correos sheet) | Correos’ own A4 sheet, laid out by Correos |
When printing on A4, you can select the starting position on the sheet (positions 1–4) to reuse partially used sheets.
Globe asks Correos’ Labels API for the labels each time you print, so you can print a label again. Labels for several orders come as one PDF, in the order you selected them. If Correos does not hand out some labels, Globe prints the others and names the missing package codes.
Troubleshooting
Section titled “Troubleshooting”| Issue | Resolution |
|---|---|
Correos settings are incomplete: … | The message lists the missing or invalid settings. Fill them in the carrier settings. |
… a sender postcode on the Spanish mainland or the Balearic Islands | Globe does not send Correos labels from the Canary Islands, Ceuta or Melilla. Enter a sender address on the mainland or the Balearic Islands. |
Correos ID did not accept the client ID and client secret of your Correos ID application | Check the Correos ID client ID and Correos ID client secret. |
Correos refused the API access … | Check the Correos Developers client ID and Correos Developers client secret, and that the application is subscribed to the Preregister and Labels APIs. |
The Correos ID login did not answer or The Correos ID login failed (HTTP …) | Nothing was created. Try again in a minute. |
… Correos does not have them as a valid contract for this access | Check the Contract number and Client number. |
… Correos has no such labeller for the contract | Check the Labeller code. |
Your Correos contract does not include this product or delivery method | Ask your Correos Gestor Comercial to add it, or choose another Correos product. |
… is not a Correos office or Citypaq or Wrong carrier for this order | Choose a Correos point with the Modify pickup point action, or use Correos Paq Premium (address) or Correos Paq Estándar (address). |
Order … has no Correos office or Citypaq, but delivery to a pickup point was chosen | Choose a point with the Modify pickup point action, or use an address product. |
… has no office or Citypaq code on the order | Choose the point again with the Modify pickup point action, or use an address product. |
Correos cannot deliver to this post office or Correos cannot deliver to this Citypaq | Choose another point with the Modify pickup point action, or ship the order to the address. |
Globe sends Correos … within Spain only | Ship the order with another carrier. |
Order … goes to the Canary Islands (or Ceuta, Melilla) | Create this label in your Correos customer area. |
the shipping address has no … or Correct the postcode of the shipping address in Shopify | Correct the shipping address in Shopify: street, a five-digit postcode and city. Then create the label again. |
the shipping address has no name or company | Add the receiver’s name to the shipping address. |
Correos sends the Citypaq pickup code by SMS … | Correct the phone on the order to a Spanish mobile number (9 digits starting with 6 or 7), or ship to a post office or the address. |
Correos tells the customer that the parcel is at the office by e-mail or SMS … | Add an e-mail address (up to 50 characters) or a Spanish mobile number to the order. |
Correos needs the receiver's e-mail (up to 50 characters) or a Spanish phone number | Add an e-mail address or a Spanish phone number to the order. |
Correct the receiver's phone in the order | Enter a Spanish number with 9 digits, a mobile number for a Citypaq. |
Correct the sender phone in the Correos settings or Correct the sender postcode in the Correos settings | Correct Sender phone or Sender ZIP in the carrier settings. |
Order … has no weight | Set the product weight in Shopify, enter Shipment weight (kg) in the label panel, or set a Default weight (kg). |
Order … weighs … kg. Correos … takes parcels up to 40 kg | If the weight is wrong, correct Shipment weight (kg) in the label panel. Otherwise ship the order with another carrier. |
Correos needs the parcel dimensions for a Citypaq or … parcel does not fit a Citypaq | Set or correct the default dimensions, or ship the order to the address or to a post office. |
Correos collects cash on delivery in EUR only, … Correos does not collect it at a Citypaq or This carrier's labels cannot carry cash on delivery | Set the COD amount to 0 if the order is already paid. For a Citypaq, ship the order to the address or to a post office. |
Correos collects up to 2499.99 EUR cash on delivery | Lower the COD amount, or ship the order with another carrier. |
Enter the IBAN Correos pays the collected amounts to … or Check the IBAN for cash on delivery in the Correos settings | Enter a valid IBAN in Sender IBAN (for COD). |
Cash on delivery needs a Correos contract that includes it | Ask your Correos Gestor Comercial. |
Correos did not confirm the shipment …, Correos did not answer in time … or … Globe could not read its package code | The shipment may exist. Check your Correos customer area before you create the label again. |
Globe could not connect to Correos (…) or Globe stopped before sending order … | Nothing was created for this order. Create its label again once the cause named in the message is fixed. |
… Globe could not save it, so Globe cancelled it at Correos again | Nothing will be sent. Create the label again in a few minutes. |
… Globe could not save it, so its label cannot be printed here | Do not create the label again. Cancel the shipment in your Correos customer area, or write to help@appfleece.com with the package code. |
Printed … of … Correos labels. Missing: … | The message names the missing package codes and Correos’ reason. Print the missing labels again. |