### Example Response for Service Point Locations Source: https://api.sendify.com/docs/api/c5abjji11oz0g-service-point-delivery An example response listing available service points. The `service_point_token` should be saved for booking the shipment. ```json { "locations": [ { "carrier": "dhl_freight_sweden", "service_point_token": "YOUR_SERVICE_POINT_TOKEN", // <── Save this "service_point_name": "LANDALA GODIS O TOBAK", "address_line": "ERIK DAHLBERGSGATAN 60", "postal_code": "41260", "city": "GÖTEBORG", "country_code": "SE", "distance_by_road": "610", "distance_great_circle": "380" } ] } ``` -------------------------------- ### Example Shipping Rules Response Source: https://api.sendify.com/docs/api/rccsl6ru36bap-getting-started This is an example response structure for the GET /shipping-rules endpoint, showing different types of rules and their configurations. ```json { "shipping_rules": [ { "hash": "abc123", "name": "Exclude DHL", "type": "exclude", "category": "search", "enabled": true }, { "hash": "def456", "name": "Prefer UPS for heavy shipments", "type": "prefer", "category": "search", "enabled": true }, { "hash": "ghi789", "name": "Include own agreement rates", "type": "include", "category": "search", "enabled": false } ] } ``` -------------------------------- ### Example Response for Service Point Rates Source: https://api.sendify.com/docs/api/c5abjji11oz0g-service-point-delivery This is an example of a response when requesting rates that include service point options. Note the `require_delivery_service_point: true` flag. ```json { "rates": [ { "price_rank": 1, "shipment_id": "YOUR_SHIPMENT_ID", "booking_token": "YOUR_BOOKING_TOKEN", // <── Save this "carrier_name": "DHL Freight", "product_name": "DHL Service Point", "price": "91", "currency": "SEK", "require_delivery_service_point": true, // <--- Service Point Rate "expires_at": "2025-04-09T13:27:18Z" } ], "warnings": [] // Carriers excluded due to field validation issues, if any } ``` -------------------------------- ### Example Tracking Response Source: https://api.sendify.com/docs/api/rccsl6ru36bap-getting-started This is an example of the JSON response you will receive when querying the tracking endpoint. It includes shipment status, description, location, and creation time. ```json [ { "ID": "1ZXXXXXXXXXXXXXXXX", "url": "https://webdev.sendify.se/tracking/{YOUR_SHIPMENT_ID}", "status": "IN_TRANSIT", "description": "Received at terminal (this is a placeholder event for testing)", "location_name": "Gothenburg", "created_at": "2025-05-14T11:17:29.754885247Z" } ] ``` -------------------------------- ### Example Booking Response Source: https://api.sendify.com/docs/api/pojbhuz6f3rp3-how-to-book-with-receiver-pays A successful booking response includes the `shipment_id` and the `main_tracking_id`. ```json { "shipment_id": "YOUR_SHIPMENT_ID", "main_tracking_id": "CARRIER_TRACKING_ID_EXAMPLE" } ``` -------------------------------- ### Example Shipment Rates Response Source: https://api.sendify.com/docs/api/rccsl6ru36bap-getting-started This is an example of the JSON response structure when requesting shipment rates. It includes details about each rate, applied shipping rules, and any warnings. ```json { "rates": [ { "price_rank": 1, "shipment_id": "YOUR_SHIPMENT_ID", "booking_token": "YOUR_BOOKING_TOKEN", "carrier_name": "UPS Sweden", "product_name": "UPS Standard", "price": "127", "currency": "SEK", "transport_business_days_min": 2, "transport_business_days_max": 2, "expires_at": "2025-05-14T11:41:56Z", "receiver_pays": false, "own_agreement": false, "require_delivery_service_point": false, "required_documents": [], "pickup": { "cutoff_date": "2025-05-14", "cutoff_time": "17:00:00", "date": "2025-05-14", "time_window_start": "13:00:00", "time_window_end": "18:00:00" }, "estimated_delivery": { "earliest_date": "2025-05-16", "time_window_start": "09:00:00", "time_window_end": "23:30:00" } }, { "price_rank": 2, "shipment_id": "YOUR_SHIPMENT_ID", "booking_token": "YOUR_BOOKING_TOKEN", "carrier_name": "DHL Freight Sweden", "product_name": "DHL Parcel Connect Plus", "price": "132", "currency": "SEK", "transport_business_days_min": 2, "transport_business_days_max": 4, "expires_at": "2025-05-14T11:41:56Z", "receiver_pays": false, "own_agreement": false, "require_delivery_service_point": false, "required_documents": [], "pickup": { "cutoff_date": "2025-05-15", "cutoff_time": "12:00:00", "date": "2025-05-15", "time_window_start": "07:00:00", "time_window_end": "17:00:00" }, "estimated_delivery": { "earliest_date": "2025-05-19", "time_window_start": "09:00:00", "time_window_end": "17:00:00" } } ], "warnings": [], "applied_shipping_rules": [ { "id": 42, "hash": "abc123", "name": "Exclude DHL", "type": "exclude", "category": "search", "enabled": true }, { "id": 43, "hash": "def456", "name": "Prefer UPS for heavy shipments", "type": "prefer", "category": "search", "enabled": true } ] } ``` -------------------------------- ### Example Tracking Request Source: https://api.sendify.com/docs/api/rccsl6ru36bap-getting-started Use this cURL command to request tracking updates for a specific shipment. Replace placeholders with your actual shipment ID and API key. ```bash curl --location 'https://app.dev.sendify.se/external/v1/shipments/{YOUR_SHIPMENT_ID}/tracking' \ --header 'x-api-key: $YOUR_API_KEY' ``` -------------------------------- ### Get All Shipping Rules Source: https://api.sendify.com/docs/api/rccsl6ru36bap-getting-started Retrieve all shipping rules for your team, including both enabled and disabled ones. Requires an API key for authentication. ```curl curl --location 'https://app.dev.sendify.se/external/v1/shipping-rules' \ --header 'x-api-key: $YOUR_API_KEY' ``` -------------------------------- ### Requesting Rates for Non-EU Shipments Source: https://api.sendify.com/docs/api/irwjtx7j5w20t-how-to-handle-shipments-outside-of-the-eu Call the POST /shipments/rates endpoint with `included_non_eu_rates: true` to get rates for shipments outside the EU. Check the response for `required_documents` and save the `booking_token`. ```json { "included_non_eu_rates": true } ``` -------------------------------- ### GET /shipping-rules Source: https://api.sendify.com/docs/api/rccsl6ru36bap-getting-started Retrieves all shipping rules for the authenticated team, including both enabled and disabled rules. These rules can be used to filter or adjust shipping rates. ```APIDOC ## GET /shipping-rules ### Description Retrieves all shipping rules for the authenticated team, including both enabled and disabled rules. These rules can be used to filter or adjust shipping rates. ### Method GET ### Endpoint /external/v1/shipping-rules ### Parameters #### Query Parameters None #### Request Body None ### Request Example ```curl curl --location 'https://app.dev.sendify.se/external/v1/shipping-rules' \ --header 'x-api-key: $YOUR_API_KEY' ``` ### Response #### Success Response (200) - **shipping_rules** (array) - A list of shipping rule objects. - **hash** (string) - Unique identifier for the shipping rule. - **name** (string) - The name of the shipping rule. - **type** (string) - The type of rule (e.g., 'exclude', 'prefer', 'include'). - **category** (string) - The category of the rule (e.g., 'search'). - **enabled** (boolean) - Indicates if the rule is currently enabled. #### Response Example ```json { "shipping_rules": [ { "hash": "abc123", "name": "Exclude DHL", "type": "exclude", "category": "search", "enabled": true }, { "hash": "def456", "name": "Prefer UPS for heavy shipments", "type": "prefer", "category": "search", "enabled": true }, { "hash": "ghi789", "name": "Include own agreement rates", "type": "include", "category": "search", "enabled": false } ] } ``` ``` -------------------------------- ### API Rates Response with Multiple Validation Issues Source: https://api.sendify.com/docs/api/rccsl6ru36bap-getting-started This example demonstrates an API rates response where all carriers are excluded. The 'rates' array is empty, and the 'warnings' array provides a comprehensive list of validation issues for a specific carrier, allowing users to identify all necessary corrections. ```json { "rates": [], "warnings": [ { "carrier_name": "UPS Sweden", "carrier_product_code": "ups_sweden_standard", "warnings": [ "Company name is too long, max 27 chars", "Contact name is too long, max 22 chars" ] } ] } ``` -------------------------------- ### API Rates Response with Excluded Carrier Source: https://api.sendify.com/docs/api/rccsl6ru36bap-getting-started This example shows a typical API rates response where one carrier is excluded due to validation errors. The 'rates' array contains available options, while the 'warnings' array details the issues for the excluded carrier. ```json { "rates": [{ "carrier_name": "DHL Freight Sweden", "...": "..." }], "warnings": [ { "carrier_name": "UPS Sweden", "carrier_product_code": "ups_sweden_standard", "warnings": ["Company name is too long, max 27 chars"] } ] } ``` -------------------------------- ### List Nearby Service Points Source: https://api.sendify.com/docs/api/c5abjji11oz0g-service-point-delivery Use this endpoint to find available service points near a given address. Provide the receiver's address details to get a list of potential service points. ```curl curl -X POST https://app.dev.sendify.se/external/v1/locations/servicepoints \ -H "X-API-KEY: $YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "address_line": "Erik Dahlbergsgatan 60", "postal_code": "41260", "city": "Göteborg", "country_code": "SE" }' ``` -------------------------------- ### Get Shipment Rates Source: https://api.sendify.com/docs/api/rccsl6ru36bap-getting-started Retrieves available shipping rates for a given shipment. You can optionally filter rates by specific shipping rules. ```APIDOC ## POST /shipments/rates ### Description Retrieves available shipping rates for a shipment. The rates are filtered based on shipment details and carrier compatibility with selected add-ons. Shipping rules can be applied to further refine the results. ### Method POST ### Endpoint https://app.dev.sendify.se/external/v1/shipments/rates ### Parameters #### Request Body - **shipment_id** (string) - Required - The ID of the shipment for which to get rates. - **requested_pickup_time** (string) - Required - The desired pickup date and time in ISO 8601 format (e.g., "2025-04-18T10:00:00+01:00"). - **shipping_rule_hashes** (array of strings) - Optional - A list of hashes for specific shipping rules to apply. If any hash does not match, the endpoint returns an HTTP 400 error. ### Request Example #### Simple Rate Request ```json { "shipment_id": "YOUR_SHIPMENT_ID", "requested_pickup_time": "2025-04-18T10:00:00+01:00" } ``` #### Rate Request with Shipping Rules ```json { "shipment_id": "YOUR_SHIPMENT_ID", "requested_pickup_time": "2025-04-18T10:00:00+01:00", "shipping_rule_hashes": ["abc123"] } ``` ### Response #### Success Response (200) - **rates** (array) - A list of available shipping rates. - **price_rank** (integer) - The rank of the price for this rate. - **shipment_id** (string) - The ID of the shipment. - **booking_token** (string) - A token to book this specific rate. - **carrier_name** (string) - The name of the shipping carrier. - **product_name** (string) - The name of the shipping product. - **price** (string) - The total price for this rate, including add-ons. - **currency** (string) - The currency of the price (e.g., "SEK"). - **transport_business_days_min** (integer) - Minimum number of business days for transport. - **transport_business_days_max** (integer) - Maximum number of business days for transport. - **expires_at** (string) - The timestamp when this rate expires. - **receiver_pays** (boolean) - Whether the receiver pays for the shipment. - **own_agreement** (boolean) - Whether this rate uses your own agreement with the carrier. - **require_delivery_service_point** (boolean) - Whether a delivery service point is required. - **required_documents** (array) - A list of required documents for this rate. - **pickup** (object) - Details about the pickup. - **cutoff_date** (string) - The cutoff date for pickup. - **cutoff_time** (string) - The cutoff time for pickup. - **date** (string) - The scheduled pickup date. - **time_window_start** (string) - The start of the pickup time window. - **time_window_end** (string) - The end of the pickup time window. - **estimated_delivery** (object) - Estimated delivery details. - **earliest_date** (string) - The earliest estimated delivery date. - **time_window_start** (string) - The start of the estimated delivery time window. - **time_window_end** (string) - The end of the estimated delivery time window. - **warnings** (array) - A list of any warnings associated with the rate retrieval. - **applied_shipping_rules** (array) - A list of shipping rules that were applied to this request. - **id** (integer) - The ID of the shipping rule. - **hash** (string) - The hash of the shipping rule. - **name** (string) - The name of the shipping rule. - **type** (string) - The type of the shipping rule (e.g., "exclude", "prefer"). - **category** (string) - The category of the shipping rule. - **enabled** (boolean) - Whether the shipping rule is enabled. #### Response Example ```json { "rates": [ { "price_rank": 1, "shipment_id": "YOUR_SHIPMENT_ID", "booking_token": "YOUR_BOOKING_TOKEN", "carrier_name": "UPS Sweden", "product_name": "UPS Standard", "price": "127", "currency": "SEK", "transport_business_days_min": 2, "transport_business_days_max": 2, "expires_at": "2025-05-14T11:41:56Z", "receiver_pays": false, "own_agreement": false, "require_delivery_service_point": false, "required_documents": [], "pickup": { "cutoff_date": "2025-05-14", "cutoff_time": "17:00:00", "date": "2025-05-14", "time_window_start": "13:00:00", "time_window_end": "18:00:00" }, "estimated_delivery": { "earliest_date": "2025-05-16", "time_window_start": "09:00:00", "time_window_end": "23:30:00" } }, { "price_rank": 2, "shipment_id": "YOUR_SHIPMENT_ID", "booking_token": "YOUR_BOOKING_TOKEN", "carrier_name": "DHL Freight Sweden", "product_name": "DHL Parcel Connect Plus", "price": "132", "currency": "SEK", "transport_business_days_min": 2, "transport_business_days_max": 4, "expires_at": "2025-05-14T11:41:56Z", "receiver_pays": false, "own_agreement": false, "require_delivery_service_point": false, "required_documents": [], "pickup": { "cutoff_date": "2025-05-15", "cutoff_time": "12:00:00", "date": "2025-05-15", "time_window_start": "07:00:00", "time_window_end": "17:00:00" }, "estimated_delivery": { "earliest_date": "2025-05-19", "time_window_start": "09:00:00", "time_window_end": "17:00:00" } } ], "warnings": [], "applied_shipping_rules": [ { "id": 42, "hash": "abc123", "name": "Exclude DHL", "type": "exclude", "category": "search", "enabled": true }, { "id": 43, "hash": "def456", "name": "Prefer UPS for heavy shipments", "type": "prefer", "category": "search", "enabled": true } ] } ``` ``` -------------------------------- ### Print Shipment Label (Get URL) Source: https://api.sendify.com/docs/api/rccsl6ru36bap-getting-started Request a shipment label by providing the shipment ID and specifying the desired label layout and output format. The default output is a URL to a PDF. ```curl curl --request POST \ --url https://app.dev.sendify.se/external/v1/shipments/print \ --header 'Accept: application/json, application/pdf' \ --header 'Content-Type: application/json' \ --header 'x-api-key: $YOUR_API_KEY' \ --data '{ "shipment_ids": [ "YOUR_SHIPMENT_ID" ], "document_type": "label", "label_layout": "1x2", "output_format": "url" }' ``` -------------------------------- ### Request Shipment Rates Source: https://api.sendify.com/docs/api/rccsl6ru36bap-getting-started Use this basic request to get available shipping rates by providing the shipment ID and requested pickup time. Ensure you replace placeholders with your actual API key and shipment ID. ```curl curl --location 'https://app.dev.sendify.se/external/v1/shipments/rates' \ --header 'x-api-key: $YOUR_API_KEY' \ --header 'Content-Type: application/json' \ --data '{ "shipment_id": "YOUR_SHIPMENT_ID", "requested_pickup_time": "2025-04-18T10:00:00+01:00" }' ``` -------------------------------- ### Request Shipment Rates with Specific Rules Source: https://api.sendify.com/docs/api/rccsl6ru36bap-getting-started To filter rates based on specific shipping rules, include the `shipping_rule_hashes` field with the relevant rule hashes obtained from the GET /shipping-rules endpoint. An invalid hash will result in a 400 error. ```curl curl --location 'https://app.dev.sendify.se/external/v1/shipments/rates' \ --header 'x-api-key: $YOUR_API_KEY' \ --header 'Content-Type: application/json' \ --data '{ "shipment_id": "YOUR_SHIPMENT_ID", "requested_pickup_time": "2025-04-18T10:00:00+01:00", "shipping_rule_hashes": ["abc123"] }' ``` -------------------------------- ### Verify API Key Source: https://api.sendify.com/docs/api/rccsl6ru36bap-getting-started Use the /status endpoint to verify if your API key is valid for the environment. This request requires your API key in the x-api-key header. ```curl curl --location 'https://app.dev.sendify.se/external/v1/status' \ --header 'x-api-key: $YOUR_API_KEY' ``` -------------------------------- ### GET /shipments/{shipment_id}/tracking Source: https://api.sendify.com/docs/api/rccsl6ru36bap-getting-started Retrieves a list of tracking events for a specific shipment. This endpoint is useful for monitoring the progress of a shipment from booking to delivery. ```APIDOC ## GET /shipments/{shipment_id}/tracking ### Description Retrieves a list of tracking events for a specific shipment. This endpoint is useful for monitoring the progress of a shipment from booking to delivery. ### Method GET ### Endpoint https://app.dev.sendify.se/external/v1/shipments/{shipment_id}/tracking ### Parameters #### Path Parameters - **shipment_id** (string) - Required - The unique identifier of the shipment. #### Query Parameters None #### Request Body None ### Request Example ```curl curl --location 'https://app.dev.sendify.se/external/v1/shipments/{YOUR_SHIPMENT_ID}/tracking' \ --header 'x-api-key: $YOUR_API_KEY' ``` ### Response #### Success Response (200) - **ID** (string) - The tracking ID. - **url** (string) - A URL to view tracking details. - **status** (string) - The current status of the shipment (e.g., IN_TRANSIT). - **description** (string) - A description of the current tracking event. - **location_name** (string) - The name of the location where the event occurred. - **created_at** (string) - The timestamp when the tracking event was created. #### Response Example ```json [ { "ID": "1ZXXXXXXXXXXXXXXXX", "url": "https://webdev.sendify.se/tracking/{YOUR_SHIPMENT_ID}", "status": "IN_TRANSIT", "description": "Received at terminal (this is a placeholder event for testing)", "location_name": "Gothenburg", "created_at": "2025-05-14T11:17:29.754885247Z" } ] ``` ``` -------------------------------- ### Verify API Key Source: https://api.sendify.com/docs/api/rccsl6ru36bap-getting-started This endpoint allows you to verify if your API key is valid for the environment by sending a request to the /status endpoint. A successful authentication will return a confirmation message and your team name. ```APIDOC ## GET /status ### Description Verifies the validity of the provided API key. ### Method GET ### Endpoint `/external/v1/status` ### Parameters #### Headers - **x-api-key** (string) - Required - Your Sendify API key. ### Request Example ```curl curl --location 'https://app.dev.sendify.se/external/v1/status' \ --header 'x-api-key: $YOUR_API_KEY' ``` ### Response #### Success Response (200) - **status** (string) - Confirmation message indicating successful authentication. - **team** (string) - The name of the authenticated team. #### Response Example ```json { "status": "You've authenticated correctly", "team": "TEAM_NAME" } ``` ``` -------------------------------- ### List Available Printers Source: https://api.sendify.com/docs/api/cgn5dam3g5jle-virtual-printing-with-print-node Use this endpoint to retrieve a list of printers configured with your PrintNode account. Note the 'id' of the printer you wish to use for printing. ```bash curl -X GET https://app.sendify.se/external/v1/printers \ -H 'X-API-KEY: $YOUR_API_KEY' ``` ```json { "printers": [ { "id": "prn-123", "name": "Office Zebra ZP450", "description": "4×6 label printer at reception" }, { "id": "prn-456", "name": "A4 Laser", "description": "Back-office multi-function device" } ] } ``` -------------------------------- ### Create Shipments Source: https://api.sendify.com/docs/api/rccsl6ru36bap-getting-started This endpoint allows you to create shipments. You can enable stricter validation by setting `enable_bookable_validation` to `true`. If validation fails, the response will detail the missing information required to make the shipment bookable. ```APIDOC ## POST /shipments ### Description Creates new shipments. The `enable_bookable_validation` flag can be set to `true` for stricter validation, which will return specific error messages for missing data required to make the shipment bookable. ### Method POST ### Endpoint `/external/v1/shipments` ### Parameters #### Headers - **x-api-key** (string) - Required - Your Sendify API key. - **Content-Type** (string) - Required - `application/json` #### Request Body - **enable_bookable_validation** (boolean) - Optional - If true, enables stricter validation for bookable shipments. - **from** (object) - Required - Information about the sender. - **name** (string) - Required - Sender's name. - **address** (object) - Required - Sender's address details. - **address_line_1** (string) - Required - First line of the sender's address. - **country_code** (string) - Required - Sender's country code (e.g., 'SE'). - **postal_code** (string) - Required - Sender's postal code. - **city** (string) - Required - Sender's city. - **contact** (object) - Required - Sender's contact information. - **name** (string) - Required - Sender's contact person name. - **phone** (string) - Required - Sender's phone number. - **email** (string) - Required - Sender's email address. - **to** (object) - Required - Information about the recipient. - **name** (string) - Required - Recipient's name. - **address** (object) - Required - Recipient's address details. - **address_line_1** (string) - Required - First line of the recipient's address. - **country_code** (string) - Required - Recipient's country code (e.g., 'DE'). - **postal_code** (string) - Required - Recipient's postal code. - **city** (string) - Required - Recipient's city. - **contact** (object) - Required - Recipient's contact information. - **name** (string) - Required - Recipient's contact person name. - **phone** (string) - Required - Recipient's phone number. - **email** (string) - Required - Recipient's email address. - **is_private_individual** (boolean) - Optional - Indicates if the recipient is a private individual. - **reference_id** (string) - Required - A unique reference ID for the shipment. - **packages** (array) - Required - An array of package details. - **depth_cm** (number) - Required - Package depth in centimeters. - **height_cm** (number) - Required - Package height in centimeters. - **width_cm** (number) - Required - Package width in centimeters. - **weight_kg** (number) - Required - Package weight in kilograms. - **quantity** (number) - Required - Number of packages. - **description** (string) - Optional - Description of the package contents. - **type** (string) - Required - Type of package (e.g., 'PACKAGE'). - **stackable** (boolean) - Optional - Indicates if the package is stackable. - **system** (string) - Required - The system originating the shipment (e.g., 'Sendify'). ### Request Example ```json { "enable_bookable_validation": true, "from": { "name": "Sendify AB", "address": { "address_line_1": "Volrathamnsgatan 4", "country_code": "SE", "postal_code": "41260", "city": "Göteborg" }, "contact": { "name": "Support Agent", "phone": "0103303091", "email": "contact@sendify.se" } }, "to": { "name": "Sendify GmbH", "address": { "address_line_1": " Jungfernstieg 30", "country_code": "DE", "postal_code": "20354", "city": "Hamburg" }, "contact": { "name": "Support Agent", "phone": "030814088588", "email": "kontact@sendify.de" }, "is_private_individual": false }, "reference_id": "Sendify Shipment", "packages": [ { "depth_cm": 20, "height_cm": 20, "width_cm": 20, "weight_kg": 2, "quantity": 1, "description": "Swedish Fika", "type": "PACKAGE", "stackable": true } ], "system": "Sendify" } ``` ### Response #### Success Response (200) - **id** (string) - The unique identifier for the created shipment. - **reference_id** (string) - The reference ID provided in the request. #### Response Example ```json { "id": "YOUR_SHIPMENT_ID", "reference_id": "Sendify Shipment" } ``` #### Error Response (e.g., 400 Bad Request for validation failures) - **errors** (object) - An object containing validation errors. - **field_name** (array) - An array of error messages for a specific field. #### Failed Validation Response Example ```json { "errors": { "packages[0].type": ["The field is required."], "packages[0].weight_kg": ["The field is required."], "from.address.address_line_1": ["The field is required."], "to.address.address_line_1": ["The field is required."], "to.contact.email": ["The field must be a valid email address."] } } ``` ``` -------------------------------- ### Book Shipment with Receiver Pays Token Source: https://api.sendify.com/docs/api/pojbhuz6f3rp3-how-to-book-with-receiver-pays Use the `POST /shipments/book` endpoint with a `booking_token` obtained from a receiver-pays rate to book the shipment. The receiver will be invoiced directly by the carrier. ```bash curl --location --request POST 'https://app.dev.sendify.se/external/v1/shipments/book' \ --header 'x-api-key: $YOUR_API_KEY' \ --header 'Content-Type: application/json' \ --data-raw '{ "booking_token": "BOOKING_TOKEN" }' ``` -------------------------------- ### Fetch Valid Carrier Identifiers Source: https://api.sendify.com/docs/api/pojbhuz6f3rp3-how-to-book-with-receiver-pays Use the `GET /carriers` endpoint to retrieve a list of all valid carrier identifiers supported by Sendify. This is useful for populating the `carrier` field when specifying receiver accounts. ```curl curl --location --request GET 'https://app.dev.sendify.se/external/v1/carriers' \ --header 'x-api-key: $YOUR_API_KEY' ``` -------------------------------- ### Print Documents via PrintNode Source: https://api.sendify.com/docs/api/cgn5dam3g5jle-virtual-printing-with-print-node Send shipping documents to a specified printer using the /shipments/print endpoint. Ensure 'output_format' is set to 'printer' and provide the correct 'printer_id'. ```bash curl -X POST https://app.sendify.se/external/v1/shipments/print \ -H 'X-API-KEY: $YOUR_API_KEY' \ -H 'Content-Type: application/json' \ -d '{ \ "shipment_ids": ["YOUR_SHIPMENT_ID"], \ "document_type": "label", \ "label_layout": "printer", \ "output_format": "printer", \ "printer_id": "PRINTER_ID" \ }' ``` ```json { "output_url": "OUTPUT_URL" } ``` -------------------------------- ### POST /shipments/book Source: https://api.sendify.com/docs/api/pojbhuz6f3rp3-how-to-book-with-receiver-pays Books a shipment using a provided booking token. This is the final step after selecting a receiver pays rate. ```APIDOC ## POST /shipments/book ### Description Books a shipment using a provided booking token. This endpoint is used after a suitable receiver pays rate has been selected and its `booking_token` obtained. ### Method POST ### Endpoint https://app.dev.sendify.se/external/v1/shipments/book ### Parameters #### Request Body - **booking_token** (string) - Required - The token obtained for the selected receiver pays rate, used to confirm the booking. ### Request Example ```json { "booking_token": "BOOKING_TOKEN" } ``` ### Response #### Success Response (200) - **shipment_id** (string) - The unique identifier for the booked shipment. - **main_tracking_id** (string) - The carrier's tracking ID for the shipment. #### Response Example ```json { "shipment_id": "YOUR_SHIPMENT_ID", "main_tracking_id": "CARRIER_TRACKING_ID_EXAMPLE" } ``` ``` -------------------------------- ### Successful API Key Authentication Response Source: https://api.sendify.com/docs/api/rccsl6ru36bap-getting-started A successful response from the /status endpoint indicates that your API key is correctly authenticated for the environment. ```json { "status": "You've authenticated correctly", "team": "TEAM_NAME" } ``` -------------------------------- ### Get Rates Requiring a Service Point Source: https://api.sendify.com/docs/api/c5abjji11oz0g-service-point-delivery Use this endpoint to retrieve shipping rates that necessitate a service point. Ensure `include_service_point_rates` is set to true. Rates requiring a service point will have `require_delivery_service_point` set to true in the response. ```curl curl -X POST https://app.dev.sendify.se/external/v1/shipments/rates \ -H "X-API-KEY: $YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "shipment_id": "YOUR_SHIPMENT_ID", "requested_pickup_time": "2025-04-10T09:00:00+02:00", "include_service_point_rates": true }' ``` -------------------------------- ### Get Rates Requiring a Service Point Source: https://api.sendify.com/docs/api/c5abjji11oz0g-service-point-delivery Retrieve shipping rates, including those that require a delivery service point, by setting `include_service_point_rates` to true. Rates requiring a service point will be flagged with `"require_delivery_service_point": true`. ```APIDOC ## POST /external/v1/shipments/rates ### Description Retrieves shipping rates, including those that require a delivery service point. ### Method POST ### Endpoint https://app.dev.sendify.se/external/v1/shipments/rates ### Parameters #### Request Body - **shipment_id** (string) - Required - The ID of the shipment. - **requested_pickup_time** (string) - Required - The requested pickup time for the shipment in ISO 8601 format. - **include_service_point_rates** (boolean) - Required - Set to `true` to include rates that require a service point. ### Request Example ```json { "shipment_id": "YOUR_SHIPMENT_ID", "requested_pickup_time": "2025-04-10T09:00:00+02:00", "include_service_point_rates": true } ``` ### Response #### Success Response (200) - **rates** (array) - A list of available shipping rates. - **price_rank** (integer) - The rank of the price. - **shipment_id** (string) - The ID of the shipment. - **booking_token** (string) - The token to use for booking the shipment. Valid for 30 minutes. - **carrier_name** (string) - The name of the carrier. - **product_name** (string) - The name of the shipping product. - **price** (string) - The price of the shipment. - **currency** (string) - The currency of the price. - **require_delivery_service_point** (boolean) - Flag indicating if a delivery service point is required. - **expires_at** (string) - The expiration time of the rate. - **warnings** (array) - Any warnings related to the rate retrieval. #### Response Example ```json { "rates": [ { "price_rank": 1, "shipment_id": "YOUR_SHIPMENT_ID", "booking_token": "YOUR_BOOKING_TOKEN", "carrier_name": "DHL Freight", "product_name": "DHL Service Point", "price": "91", "currency": "SEK", "require_delivery_service_point": true, "expires_at": "2025-04-09T13:27:18Z" } ], "warnings": [] } ``` ``` -------------------------------- ### Create Shipment with Receiver's Carrier Account Source: https://api.sendify.com/docs/api/pojbhuz6f3rp3-how-to-book-with-receiver-pays When creating a shipment via `POST /shipments`, include the receiver's carrier account information in the `to.carrier_accounts` array. This enables the 'Receiver Pays' functionality. ```json { "enable_bookable_validation": true, "from": { "name": "Sendify AB", "address": { "address_line_1": "Volrathamnsgatan 4", "country_code": "SE", "postal_code": "41260", "city": "Göteborg" }, "contact": { "name": "Support Agent", "phone": "0103303091", "email": "contact@sendify.se" } }, "to": { "name": "Sendify GmbH", "address": { "address_line_1": "Pontus Wiknersgatan 1", "country_code": "SE", "postal_code": "41132", "city": "Göteborg" }, "contact": { "name": "Holger", "phone": "0707112233", "email": "holger@sendify.se" }, "is_private_individual": false, "carrier_accounts": [ { "carrier": "dhl_freight_sweden", "account_identifier": "123456" } ] }, "reference_id": "Sendify Shipment", "packages": [ { "depth_cm": 20, "height_cm": 20, "width_cm": 20, "weight_kg": 2, "quantity": 1, "description": "Swedish Fika", "type": "PACKAGE", "stackable": true } ], "system": "Sendify" } ``` -------------------------------- ### Book Shipment with Service Point Source: https://api.sendify.com/docs/api/c5abjji11oz0g-service-point-delivery Book a shipment by providing both the `booking_token` obtained from rate retrieval and the `delivery_service_point_token` selected from the service point list. ```curl curl -X POST https://app.dev.sendify.se/external/v1/shipments/book \ -H "X-API-KEY: $YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "booking_token": "YOUR_BOOKING_TOKEN", "delivery_service_point_token": "YOUR_SERVICE_POINT_TOKEN" }' ``` -------------------------------- ### Book Shipment with Service Point Source: https://api.sendify.com/docs/api/c5abjji11oz0g-service-point-delivery Book a shipment using a previously obtained `booking_token` and the `service_point_token` of the chosen delivery location. ```APIDOC ## POST /external/v1/shipments/book ### Description Books a shipment using a booking token and a selected delivery service point token. ### Method POST ### Endpoint https://app.dev.sendify.se/external/v1/shipments/book ### Parameters #### Request Body - **booking_token** (string) - Required - The token obtained from the rates request. - **delivery_service_point_token** (string) - Required - The token of the chosen delivery service point. ### Request Example ```json { "booking_token": "YOUR_BOOKING_TOKEN", "delivery_service_point_token": "YOUR_SERVICE_POINT_TOKEN" } ``` ### Response #### Success Response (200) - **shipment_id** (string) - The ID of the booked shipment. - **main_tracking_id** (string) - The main tracking ID for the shipment. #### Response Example ```json { "shipment_id": "YOUR_SHIPMENT_ID", "main_tracking_id": "SE11XXXXXXX0" } ``` ``` -------------------------------- ### Request Receiver Pays Rates Source: https://api.sendify.com/docs/api/pojbhuz6f3rp3-how-to-book-with-receiver-pays Include the `required_addons` object with `receiver_pays: true` in your `POST /shipments/rates` request to filter for rates that support receiver pays. Ensure the receiver's carrier account details are already set. ```curl curl --location --request POST 'https://app.dev.sendify.se/external/v1/shipments/rates' \ --header 'x-api-key: $YOUR_API_KEY' \ --header 'Content-Type: application/json' \ --data-raw '{ "shipment_id": "YOUR_SHIPMENT_ID", "requested_pickup_time": "2025-08-15T10:00:00+02:00", "required_addons": { "receiver_pays": true } }' ``` -------------------------------- ### Create Bookable Shipment Source: https://api.sendify.com/docs/api/rccsl6ru36bap-getting-started Create shipments using the POST /shipments endpoint. Set enable_bookable_validation to true for stricter validation. If data is missing, the API will detail the required information. ```curl curl --location 'https://app.dev.sendify.se/external/v1/shipments' \ --header 'x-api-key: $YOUR_API_KEY' \ --header 'Content-Type: application/json' \ --data-raw '{ "enable_bookable_validation": true, "from": { "name": "Sendify AB", "address": { "address_line_1": "Volrathamnsgatan 4", "country_code": "SE", "postal_code": "41260", "city": "Göteborg" }, "contact": { "name": "Support Agent", "phone": "0103303091", "email": "contact@sendify.se" } }, "to": { "name": "Sendify GmbH", "address": { "address_line_1": " Jungfernstieg 30", "country_code": "DE", "postal_code": "20354", "city": "Hamburg" }, "contact": { "name": "Support Agent", "phone": "030814088588", "email": "kontact@sendify.de" }, "is_private_individual": false }, "reference_id": "Sendify Shipment", "packages": [ { "depth_cm": 20, "height_cm": 20, "width_cm": 20, "weight_kg": 2, "quantity": 1, "description": "Swedish Fika", "type": "PACKAGE", "stackable": true } ], "system": "Sendify" }' ``` -------------------------------- ### Book Shipment Request Source: https://api.sendify.com/docs/api/irwjtx7j5w20t-how-to-handle-shipments-outside-of-the-eu Book the shipment using the obtained booking token after all required documents have been uploaded. The request body must be JSON. ```curl curl --location --request POST 'https://app.dev.sendify.se/external/v1/shipments/book' \ --header 'x-api-key: $YOUR_API_KEY' \ --header 'Content-Type: application/json' \ --data-raw '{ \ "booking_token": "BOOKING_TOKEN" \ }' ``` -------------------------------- ### Print Label Response (URL Output) Source: https://api.sendify.com/docs/api/rccsl6ru36bap-getting-started The response when requesting a label with output format 'url' contains a URL to the PDF label. ```json { "output_url": "OUTPUT_URL" } ``` -------------------------------- ### Book a Shipment Source: https://api.sendify.com/docs/api/rccsl6ru36bap-getting-started Use this endpoint to book a shipment after obtaining a booking token from a rate. Requires your API key and the booking token in the request body. ```curl curl --location 'https://app.dev.sendify.se/external/v1/shipments/book' \ --header 'x-api-key: $YOUR_API_KEY' \ --header 'Content-Type: application/json' \ --data '{"booking_token": "YOUR_BOOKING_TOKEN"}' ``` -------------------------------- ### Create Shipment Response Source: https://api.sendify.com/docs/api/irwjtx7j5w20t-how-to-handle-shipments-outside-of-the-eu The response to a successful shipment creation request includes the shipment ID and reference ID. ```json { "id": "YOUR_SHIPMENT_ID", "reference_id": "Sendify Shipment" } ```