# Create shipping label Create a shipping label for the transportation of the items Endpoint: POST /shipping_labels Version: 1.4.2 Security: bearerAuth ## Request fields (application/json): - `shopCode` (string) Shop code which belongs the shipment. In case this field is not informed, it will be obtained from security context. In case it is informed, it will be validated against the security context Example: "marchelacolombine" - `shipmentType` (string, required) Shiptment type Enum: "DELIVERY", "RETURN" - `clientShipmentId` (string, required) ID of the shipment assigned by the merchant. It will be communicated to the carrier in order to be printed in the label Example: "SHP123" - `clientShipmentName` (string) Name of the shipment assigned by the merchant Example: "S123" - `carrierServiceCode` (string, required) Code of the carrier connection Example: "IF-UPS-EXPRESS-SAVER" - `carrierOptions` (object) - `carrierOptions.customsOptions` (object) - `carrierOptions.customsOptions.exportTrackingNumber` (string) In case of return, the tracking number of the exportation shipment Example: "1ZW699A59506626197" - `carrierOptions.pudoOptions` (object) - `carrierOptions.pudoOptions.pudoEnabled` (boolean) Flag to indicate if a PUDO location will be used Example: true - `carrierOptions.pudoOptions.pudoCode` (string) Code of the PUDO location Example: "2778782" - `carrierOptions.pudoOptions.pudoName` (string) Name of the PUDO location Example: "New Bookstore" - `labelFormat` (string, required) Allow to request a specific label format. In case is not informed, the default format for the carrier will be used. In case the carrier does not support the requested format, the default format for the carrier will be used. The final format will be included in the response Enum: "PDF", "ZPL" - `tags` (array) Tags assigned to the shipping label Example: ["salesChannel:retail","type:premium"] - `shipper` (object) Shipper for the transportation - `shipper.fullName` (string) Full name of the shipper Example: "iF warehouse" - `shipper.email` (string) Email associated to the shipper Example: "warehouse@if.com" - `shipper.phone` (string) Phone associated to the shipper Example: 34666666666 - `shipper.address` (object) - `shipper.address.line1` (string, required) Line 1 of the Address Example: "Calle de Fortunata y Jacinta 12" - `shipper.address.line2` (string) Line 2 data of the address - `shipper.address.city` (string, required) City name of the address Example: "Madrid" - `shipper.address.postalCode` (string, required) Postal code of the address Example: "28020" - `shipper.address.region` (string) Region name of the address Example: "Madrid" - `shipper.address.countryCode` (string, required) Country ISO code of the address Example: "ES" - `origin` (object, required) Origin address for the transportation - `origin.fullName` (string, required) Full name associated to the origin Example: "Juan Perez" - `origin.code` (string) Code associated to the origin Example: "Juan Perez" - `origin.email` (string, required) Email associated to the origin Example: "customer@if.com" - `origin.phone` (string, required) Phone associated to the origin Example: 34666666666 - `destination` (object, required) Destination address for the transportation - `destination.fullName` (string, required) Full name of the destination Example: "iF warehouse" - `destination.code` (string) Code associated to the destination - `destination.email` (string, required) Email associated to the destination Example: "warehouse@if.com" - `destination.phone` (string, required) Phone associated to the destination Example: 34666666666 - `parcels` (array) - `parcels.clientParcelId` (string, required) Client reference for the parcel Example: "P001" - `parcels.description` (number, required) Description of the parcel content Example: "Goods" - `parcels.weight` (number) Weight of the parcel in grams Example: 1000 - `parcels.height` (number) Height of the parcel in centimeters Example: 10 - `parcels.length` (number) Height of the parcel in centimeters Example: 10 - `parcels.width` (number) Width of the parcel in centimeters Example: 10 - `parcels.items` (array) - `parcels.items.sku` (string) SKU of the declared items Example: "P9991" - `parcels.items.barcode` (string) Barcode of the declared items Example: 40159000 - `parcels.items.description` (string, required) Description of the shipment content Example: "T-shirt blue XL" - `parcels.items.hsCode` (string, required) Description of the shipment content Example: 40159000 - `parcels.items.weight` (number) Weight of the content in kg Example: 1000 - `parcels.items.quantity` (number, required) Quantity of the declared items Example: 1 - `parcels.items.unitPrice` (number, required) Unit price of the declared items Example: 120 - `parcels.items.currencyCode` (string) Unit price of the declared items Example: "EUR" - `parcels.items.originCountryCode` (string) Country code of origin of the Goods Example: "ES" ## Response 200 fields (application/json): - `carrierCode` (string) Carrier code associated to the shipment Example: "ups" - `carrierExternalCode` (string) External carrier code associated to the shipment Example: 20000008 - `carrierServiceCode` (string) Carrier service associated to the shipment Example: "IF-UPS-EXPRESS-SAVER" - `clientShipmentId` (string) ID of the shipment assigned by the merchant Example: "SHP123" - `shippingLabels` (array) List of shipping labels - `shippingLabels.carrierTrackingCode` (string) Reference assigned by the carrier to the shipment Example: "PARC0001" - `shippingLabels.carrierTrackingUrl` (string) URL for shipment tracking Example: "https://carrier.com/tracking/S4848554544545" - `shippingLabels.isLabelFree` (boolean) Flag to indicate the shipment is label free Example: true - `shippingLabels.labelFreeCode` (object) Code to be used for the delivery of the package to the carrier in the case of label-free shipments - `shippingLabels.labelFreeCode.format` (string) Format of the label or free-label code Enum: "PDF", "ZPL", "PNG" - `shippingLabels.labelFreeCode.base64` (string) Label-free code in base64 Example: "AFJJJKJLDHKFJDLLKJKL..." - `shippingLabels.labelFreeCode.url` (string) URL for getting the label-free code Example: "https://if.com/image.png" - `shippingLabels.base64` (string) Shipping label in base64 Example: "R0lGODlhLAGCAPcAAAAA..." - `shippingLabels.url` (string) URL for getting the shipping label Example: "https://if.com/shippping_label.pdf" ## Response 400 fields (application/json): - `errors` (array) - `errors.code` (string) Error code Example: "VA001" - `errors.message` (string) Error message Example: "The origin address is not valid" - `errors.carrierErrors` (array) - `errors.carrierErrors.carrierName` (string) Example: "SEUR" - `errors.carrierErrors.carrierService` (string) Example: "RETHOME" - `errors.carrierErrors.code` (string) Example: "ER001" - `errors.carrierErrors.message` (string) Example: "Zip code for sender address has an incorrect format" ## Response 401 fields ## Response 405 fields ## Response 500 fields