### API Request Body Example (JSON) Source: https://documenter.getpostman.com/view/26992907/2s93Y2S2Q8 This JSON object demonstrates the structure for a request body to create a shipment. It includes sender and recipient details, shipment options, and payment information. ```json { "testMode": 0, "senderId": 333, "courierId": 20, "waybillAvailableDate": "2023-06-29", "serviceName": "crossborder", "recipient": { "name": "Test User", "countryIsoCode": "HU", "cityId": 20144281, "region": "null", "cityName": "Balatonszárszó", "zipCode": "8624", "streetName": "test street", "buildingNumber": 0, "officeId": 1297, "addressText": "additional text, address test", "contactPerson": "Test User", "phoneNumber": "00889000000", "email": "2@2.com" }, "awb": { "shipmentType": "pack", "parcels": 1, "envelopes": 0, "totalWeight": 1.000, "declaredValue": 0, "bankRepayment": 0.0, "otherRepayment": "additional text for repayment", "observations": "notes", "openPackage": false, "shipmentPayer": "sender", "saturdayDelivery": false, "referenceNumber": "000000" } } ``` -------------------------------- ### API Response Example (JSON) Source: https://documenter.getpostman.com/view/26992907/2s93Y2S2Q8 This JSON object represents a typical successful response from the API, containing shipment details such as AWB number, barcode, and package barcodes. ```json { "awb": 7000008793166, "barcode": "7000008793166001F4348", "returnLabelNumber": "", "packagesBarcodes": [ "7000008793166001F4348", "7000008793166002F4348", "7000008793166003F4348", "7000008793166004F4348", "7000008793166005F4348", "7000008793166006F4348", "7000008793166007F4348" ] } ``` -------------------------------- ### API Request Body Example (JSON) Source: https://documenter.getpostman.com/view/26992907/2s93Y2S2Q8#intro This JSON object demonstrates the structure for a request body to create a shipment. It includes sender and recipient details, shipment type, and other relevant information. ```json { "testMode": 0, "senderId": 333, "courierId": 20, "waybillAvailableDate": "2023-06-29", "serviceName": "crossborder", "recipient": { "name": "Test User", "countryIsoCode": "HU", "cityId": 20144281, "region": "null", "cityName": "Balatonszárszó", "zipCode": "8624", "streetName": "test street", "buildingNumber": 0, "officeId": 1297, "addressText": "additional text, address test", "contactPerson": "Test User", "phoneNumber": "00889000000", "email": "2@2.com" }, "awb": { "shipmentType": "pack", "parcels": 1, "envelopes": 0, "totalWeight": 1.000, "declaredValue": 0, "bankRepayment": 0.0, "otherRepayment": "additional text for repayment", "observations": "notes", "openPackage": false, "shipmentPayer": "sender", "saturdayDelivery": false, "referenceNumber": "000000" } } ``` -------------------------------- ### Shipment Creation Request Example (cURL) Source: https://documenter.getpostman.com/view/26992907/2s93Y2S2Q8 This cURL command demonstrates how to send a POST request to the shipment creation API endpoint. It includes the necessary headers and the JSON payload for creating a shipment. Ensure the API endpoint URL and authentication token are correct. ```curl curl --location 'https://api1.inout.bg/api/v1/createAWB' \ --data-raw '{ "testMode": 0, "senderId": 333, "courierId": 20, "waybillAvailableDate": "2023-01-23", "serviceName": "eushipmentsairexpress", "recipient": { "name": "Test User", "countryIsoCode": "HU", "cityId": 20144281, "region": "null", "cityName": "Balatonszárszó", "zipCode": "8624", "streetName": "test street", "buildingNumber": 0, "addressText": "additional text, address test", "contactPerson": "Test User", "phoneNumber": "00889000000", "email": "2@2.com" }, "awb": { "parcels": 1, "envelopes": 0, "totalWeight": 1.000, "declaredValue": 0, "bankRepayment": 0.0, "otherRepayment": "additional text for repayment", "observations": "notes", "openPackage": false, "shipmentPayer": "sender", "saturdayDelivery": false, "referenceNumber": "000000", "products": "test product", "fragile": 1, "productsInfo": "1111;2222;3333;4444", "piecesInPack": 4, "document": { "content": "JVBERi0xLjcKJcfsj6IKOCAwIG9iago8PC9MZW5ndGggOSAwIFIvRmlsdGVyIC9GbGF0ZURlY29kZT4+CnN0cmVhbQp4nL1bW3fbxhF+56+Yc3JO66Tmeu8L6M2SL1EqW44oOy99gUjYpg8vMkg6UU4f0qRu2vSW...", "format": "pdf" }, "packages": [ { "dimensions": { "width": 20, "height": 20, "length": 20 }, "weight": 1 } ] }, "customsData": { "dutyPaymentInfo": "DDU", "customsValue": 35.50 } }' ``` -------------------------------- ### Shipment Creation Request Example (cURL) Source: https://documenter.getpostman.com/view/26992907/2s93Y2S2Q8 This cURL command demonstrates how to send a POST request to the API to create a shipment. It includes the full JSON payload in the request body and specifies the endpoint URL. This is useful for testing or integrating with systems that use cURL. ```curl curl --location 'https://api1.inout.bg/api/v1/createAWB' \ --data-raw '{ "serviceName": "crossborder", "waybillAvailableDate": "2022-08-30", "senderId": "333", "courierId": "15", "testMode": "0", "awb": { "shipmentType": "pallet", "referenceNumber": "1234567", "totalWeight": "100", "envelopes": "0", "parcels": "0", "pallets": "1", "declaredValue": 5, "observations": null, "products": "test test", "packages": { "1": { "dimensions": { "width": "80", "height": "150", "length": "120" }, "weight": "100" } }, "bankRepayment": null }, "recipient": { "name": "API - TESTS", "cityId": null, "countryIsoCode": "BG", "cityName": "София", "zipCode": "1000", "region": null, "streetName": "ул. Иван Вазов 12", "buildingNumber": null, "addressText": null, "phoneNumber": "0887000000", "contactPerson": "API - TESTS", "email": "example@example.com" }, "courierRequest": { "date": "2022-08-30", "timeFrom": "00:00", "timeTo": "00:00" } }' ``` -------------------------------- ### Shipment Creation Request Example (JSON) Source: https://documenter.getpostman.com/view/26992907/2s93Y2S2Q8 This JSON payload is used to create a new shipment via the API. It includes detailed information about the sender, recipient, shipment contents, and customs data. Ensure all required fields are correctly populated. ```json { "testMode": 0, "senderId": 333, "courierId": 20, "waybillAvailableDate": "2023-01-23", "serviceName": "eushipmentsairexpress", "recipient": { "name": "Test User", "countryIsoCode": "HU", "cityId": 20144281, "region": "null", "cityName": "Balatonszárszó", "zipCode": "8624", "streetName": "test street", "buildingNumber": 0, "addressText": "additional text, address test", "contactPerson": "Test User", "phoneNumber": "00889000000", "email": "2@2.com" }, "awb": { "parcels": 1, "envelopes": 0, "totalWeight": 1.000, "declaredValue": 0, "bankRepayment": 0.0, "otherRepayment": "additional text for repayment", "observations": "notes", "openPackage": false, "shipmentPayer": "sender", "saturdayDelivery": false, "referenceNumber": "000000", "products": "test product", "fragile": 1, "productsInfo": "1111;2222;3333;4444", "piecesInPack": 4, "document": { "content": "JVBERi0xLjcKJcfsj6IKOCAwIG9iago8PC9MZW5ndGggOSAwIFIvRmlsdGVyIC9GbGF0ZURlY29kZT4+CnN0cmVhbQp4nL1bW3fbxhF+56+Yc3JO66Tmeu8L6M2SL1EqW44oOy99gUjYpg8vMkg6UU4f0qRu2vSW...", "format": "pdf" }, "packages": [ { "dimensions": { "width": 20, "height": 20, "length": 20 }, "weight": 1 } ] }, "customsData": { "dutyPaymentInfo": "DDU", "customsValue": 35.50 } } ``` -------------------------------- ### API Response Example (JSON) Source: https://documenter.getpostman.com/view/26992907/2s93Y2S2Q8 This JSON object represents a successful API response, containing the AWB number and barcode of a shipment. It's a common output format for shipment-related queries. ```json { "awb": "1507023066", "barcode": "" } ``` -------------------------------- ### Additional Web Services Source: https://documenter.getpostman.com/view/26992907/2s93Y2S2Q8#intro Documentation for other miscellaneous web services available in the euShipments API. ```APIDOC ## Additional Web Services ### Description This section covers any additional web services not categorized under AWB Creation, Location, or Fulfilment, offering further functionalities. ``` -------------------------------- ### Fulfilment Documentation Source: https://documenter.getpostman.com/view/26992907/2s93Y2S2Q8 This section provides documentation for Fulfilment related web services. ```APIDOC ## Fulfilment Documentation ### Description This endpoint is used for managing fulfilment operations. ### Method POST ### Endpoint /fulfilment ### Parameters #### Query Parameters - **apiKey** (string) - Required - Your API key for authentication. #### Request Body - **orderId** (string) - Required - The ID of the order to fulfil. - **items** (array) - Required - A list of items to be fulfilled. - **sku** (string) - Required - Stock Keeping Unit of the item. - **quantity** (integer) - Required - Quantity of the item. ### Request Example ```json { "apiKey": "YOUR_API_KEY", "orderId": "ORDER12345", "items": [ { "sku": "SKU001", "quantity": 2 }, { "sku": "SKU002", "quantity": 1 } ] } ``` ### Response #### Success Response (200) - **fulfilmentId** (string) - The unique identifier for the fulfilment. - **status** (string) - The status of the fulfilment operation. #### Response Example ```json { "fulfilmentId": "FULFILMENT98765", "status": "Processing" } ``` ``` -------------------------------- ### Create Shipment Request using cURL Source: https://documenter.getpostman.com/view/26992907/2s93Y2S2Q8#intro This snippet demonstrates how to create a shipment using a cURL command. It includes all necessary parameters for sender, recipient, and shipment details. Ensure you replace placeholder values with actual data. ```curl curl --location 'https://api1.inout.bg/api/v1/createAWB' \ --data-raw '{ \ "testMode": 0, //On the test environment, all shipments save on test env. \ "senderId": 333, //ID of company, obtain an ID from Companies Web Service or your key account manager. \ "courierId": 20, //ID of courier, obtain an ID from Couriers Web Service. \ "waybillAvailableDate": "2023-06-29", //Always use today date. \ "serviceName": "crossborder", //By default use "crossborder". Service "eushipmentsairexpress" is only for delivery partner "DLH". \ "recipient": { \ "name": "Test User", //Name of recipient or company. Typically, both customer names (first name and last name) or company. \ "countryIsoCode": "HU", //Two digits country ISO code. \ "cityId": 20144281, //The ID of a city where the shipment needs to delivery. Obtain an ID from Cities_Web_Service_v1.0. Using cityId, cityName and zipCode can be null. \ "region": "null", //The Municipality/county were the city is located. \ "cityName": "Balatonszárszó", //City name. If you have your own nomenclature with а cities, you can fill in the fields cityName, zipCode and region. \ "zipCode": "8624", //Zip code. \ "streetName": "test street", //Name of the street, office address or office name - e.g. If you create shipment to address - Main street or Main street 10.If you want to create shipment to an office, please add a keyword "to office: " to office name or office address. \ "buildingNumber": 0, //Number of the street/building - e.g. 10 \ "officeId": 1297, //if the courier support PUDO delivery, you can send ID of the PUDO. Obtain the PUDO ID'\''s from "Courier_Offices_Web_Service_v1.2" \ "addressText": "additional text, address test", //Additional address information – e.g. бл.25 ет 3. or bl.25 et. 3 *NOT ALL COURIERS SUPPORT IT* \ "contactPerson": "Test User", //Contact person. Usually is the same as the name of recipient. \ "phoneNumber": "00889000000", //Recipient'\'s phone number - mandatory for all coureirs. \ "email": "2@2.com" // Recipient'\'s email - highly recomended \ }, \ "awb": { \ "shipmentType": "pack", //pack or pallet \ "parcels": 1, // Number of parcels in the shipment. *NOT ALL COURIERS SUPPORT MULTIPARCEL SERVICE* \ "envelopes": 0, //Always send "0". \ "totalWeight": 1.000, //Total weight of the shipment in kg. The value have to be equal to the sum of all packages. \ "declaredValue": 0, //Insurance amount of the shipment. *NOT ALL COURIERS SUPPORT THE SERVICE* \ "bankRepayment": 0.0, //COD amount of the shipment in local currency. You can set to 0 if the shipment doesn'\'t have a COD amount. \ "otherRepayment": "additional text for repayment",//The service is no longer supported \ "observations": "notes", //Additional information about the shipment/products. (notes) \ "openPackage": false, //Check up the shipment before pay. \ "shipmentPayer": "sender", //Always "sender" \ "saturdayDelivery": false, //The service is no longer supported \ "referenceNumber": "000000", //Client reference number. Important: The information in the field must be unique to avoid duplicate shipments! \ "products": "test product", //The content of the shipment. e.g. product1 product2 \ "fragile": 1, //Marker whether the content is fragile. (fragile = 1 if the content is fragile) – Used only for BG \ "productsInfo": "1111;2222;3333;4444", //Аdditional product information. \ "piecesInPack": 4, //Products amount in one shipment. e.g If the shipment contain 5 products the field will be filled with 5. \ "packages": { \ "1": { \ "dimensions": { \ "width": 20, \ "height": 20, \ "length": 20 \ }, \ "weight": 2.300 \ } \ } \ }, \ "returnLabel": { \ "nDaysValid": 0 //By default is 0 (infinity). FUsed only for Greece \ } \ }' ``` -------------------------------- ### Others Source: https://documenter.getpostman.com/view/26992907/2s93Y2S2Q8#intro Documentation for any other miscellaneous services or endpoints not explicitly listed. ```APIDOC ## Others ### Description This section is a catch-all for any other relevant API functionalities or endpoints that do not fit into the main categories. ``` -------------------------------- ### AWB Creation Source: https://documenter.getpostman.com/view/26992907/2s93Y2S2Q8#intro Documentation related to the AWB Creation service within the euShipments API. ```APIDOC ## AWB Creation ### Description This section details the API endpoints and procedures for creating Air Waybills (AWBs) using the euShipments API. ``` -------------------------------- ### euShipments API - General Information Source: https://documenter.getpostman.com/view/26992907/2s93Y2S2Q8#intro General information about the euShipments API, including base URLs for different environments and authentication methods. ```APIDOC ## euShipments API - General Information ### Description The euShipments API supports both HTTP POST and GET requests. The request body can be a JSON string or URL query parameters, and the response is in JSON format. ### API Base URLs - **Test Environment:** `https://test-api.inout.bg/api/v1/` - **Production Environment:** `https://api1.inout.bg/api/v1/` ### Authentication API requests must include an API token in the header with the keyword "Bearer" preceding the token. **Header Example:** `Authorization: Bearer "**API Token - on request**"` ### How to Use Web Services **Web Service URL:** `BASE_URL/API Endpoint` **Example (Test Environment):** `https://test-api.inout.bg/api/v1/get-countries` **Example (Production Environment):** `https://api1.inout.bg/api/v1/get-countries` ``` -------------------------------- ### Location Web Services Source: https://documenter.getpostman.com/view/26992907/2s93Y2S2Q8#intro Documentation for the Location Web Services provided by the euShipments API. ```APIDOC ## Location Web Services ### Description This section outlines the available web services for managing and retrieving location-based data within the euShipments platform. ``` -------------------------------- ### PreAWB Source: https://documenter.getpostman.com/view/26992907/2s93Y2S2Q8#intro Documentation for the PreAWB service within the euShipments API. ```APIDOC ## PreAWB ### Description This section details the API endpoints and procedures for managing Pre-AWBs using the euShipments API. ``` -------------------------------- ### Create Shipment Request using cURL Source: https://documenter.getpostman.com/view/26992907/2s93Y2S2Q8 This snippet demonstrates how to create a shipment using the 'createAWB' endpoint via a cURL request. It includes detailed parameters for sender, recipient, shipment details, package information, and return labels. Ensure all required fields are populated correctly based on the service documentation. ```curl curl --location 'https://api1.inout.bg/api/v1/createAWB' \ --data-raw '{ \ "testMode": 0, //On the test environment, all shipments save on test env. \ "senderId": 333, //ID of company, obtain an ID from Companies Web Service or your key account manager. \ "courierId": 20, //ID of courier, obtain an ID from Couriers Web Service. \ "waybillAvailableDate": "2023-06-29", //Always use today date. \ "serviceName": "crossborder", //By default use "crossborder". Service "eushipmentsairexpress" is only for delivery partner "DLH". \ "recipient": { \ "name": "Test User", //Name of recipient or company. Typically, both customer names (first name and last name) or company. \ "countryIsoCode": "HU", //Two digits country ISO code. \ "cityId": 20144281, //The ID of a city where the shipment needs to delivery. Obtain an ID from Cities_Web_Service_v1.0. Using cityId, cityName and zipCode can be null. \ "region": "null", //The Municipality/county were the city is located. \ "cityName": "Balatonszárszó", //City name. If you have your own nomenclature with а cities, you can fill in the fields cityName, zipCode and region. \ "zipCode": "8624", //Zip code. \ "streetName": "test street", //Name of the street, office address or office name - e.g. If you create shipment to address - Main street or Main street 10.If you want to create shipment to an office, please add a keyword "to office: " to office name or office address. \ "buildingNumber": 0, //Number of the street/building - e.g. 10 \ "officeId": 1297, //if the courier support PUDO delivery, you can send ID of the PUDO. Obtain the PUDO ID'\''s from "Courier_Offices_Web_Service_v1.2" \ "addressText": "additional text, address test", //Additional address information – e.g. бл.25 ет 3. or bl.25 et. 3 *NOT ALL COURIERS SUPPORT IT* \ "contactPerson": "Test User", //Contact person. Usually is the same as the name of recipient. \ "phoneNumber": "00889000000", //Recipient'\''s phone number - mandatory for all coureirs. \ "email": "2@2.com" // Recipient'\''s email - highly recomended \ }, \ "awb": { \ "shipmentType": "pack", //pack or pallet \ "parcels": 1, // Number of parcels in the shipment. *NOT ALL COURIERS SUPPORT MULTIPARCEL SERVICE* \ "envelopes": 0, //Always send "0". \ "totalWeight": 1.000, //Total weight of the shipment in kg. The value have to be equal to the sum of all packages. \ "declaredValue": 0, //Insurance amount of the shipment. *NOT ALL COURIERS SUPPORT THE SERVICE* \ "bankRepayment": 0.0, //COD amount of the shipment in local currency. You can set to 0 if the shipment doesn'\''t have a COD amount. \ "otherRepayment": "additional text for repayment",//The service is no longer supported \ "observations": "notes", //Additional information about the shipment/products. (notes) \ "openPackage": false, //Check up the shipment before pay. \ "shipmentPayer": "sender", //Always "sender" \ "saturdayDelivery": false, //The service is no longer supported \ "referenceNumber": "000000", //Client reference number. Important: The information in the field must be unique to avoid duplicate shipments! \ "products": "test product", //The content of the shipment. e.g. product1 product2 \ "fragile": 1, //Marker whether the content is fragile. (fragile = 1 if the content is fragile) – Used only for BG \ "productsInfo": "1111;2222;3333;4444", //Аdditional product information. \ "piecesInPack": 4, //Products amount in one shipment. e.g If the shipment contain 5 products the field will be filled with 5. \ "packages": { \ "1": { \ "dimensions": { \ "width": 20, \ "height": 20, \ "length": 20 \ }, \ "weight": 2.300 \ } \ } \ }, \ "returnLabel": { \ "nDaysValid": 0 //By default is 0 (infinity). FUsed only for Greece \ } \ }' ``` -------------------------------- ### POST /api/v1/createAWB Source: https://documenter.getpostman.com/view/26992907/2s93Y2S2Q8 Creates a new shipment by providing the API token and shipment data. This endpoint is used for both test and production environments. ```APIDOC ## POST /api/v1/createAWB ### Description Creates a new shipment according to the provided API token and the shipment's data. This service allows direct shipment creation from your company's software or website. ### Method POST ### Endpoint https://api1.inout.bg/api/v1/createAWB ### Parameters #### Query Parameters - **API_TOKEN** (string) - Required - Bearer token for authentication. #### Request Body - **testMode** (boolean) - Yes - If true, uses the API for testing only. Applies only to the production environment. On the test environment, all shipments are saved to the test environment. - **senderId** (integer) - Yes - ID of the company. Obtain an ID from the Companies Web Service. - **courierId** (integer) - Yes - ID of the courier. Obtain an ID from the Couriers Web Service. - **waybillAvailableDate** (date) - Yes - The date on which the shipment is to be dispatched. - **serviceName** (string) - Yes - The service name must be one of the following: `crossborder`, `eushipmentsairexpress`. - **recipient** (object) - Yes - Recipient details. - **name** (string) - Yes - Name of recipient or company. - **cityId** (integer) - Yes - The ID of a city where the shipment needs to delivery. Obtain an ID from the Cities resource. - **countryIsoCode** (string) - No - Two digits country ISO code. - **cityName** (string) - No - City name. If you have your own nomenclature with cities, you can fill in the fields `cityName`, `zipCode`, and `region`. - **zipCode** (string) - No - Zip code. - **region** (string) - No - Region. - **streetName** (string) - Yes - Name of the street, office address, or office name. For offices, use the format "to office: [office name or address]". - **buildingNumber** (integer) - Yes - Number of the street/building. - **addressText** (string) - Yes - Additional address information (e.g., `бл.25 ет 3.` or `bl.25 et. 3`). - **contactPerson** (string) - No - Contact person. Usually the same as the recipient's name. - **phoneNumber** (string) - Yes - Phone number of the recipient. - **email** (email) - No - Email of the recipient. Mandatory for some partners. - **awb** (object) - Yes - Shipment details. - **shipmentType** (string) - No - Enum: `pack` or `pallet`. - **parcels** (integer) - Yes - Number of parcels in the shipment. - **envelopes** (integer) - Yes - Number of envelopes in the shipment. - **pallets** (integer) - No - The number of pallets. - **totalWeight** (numeric) - Yes - Total weight of the shipment in kg. - **declaredValue** (numeric) - No - Insurance amount of the shipment. The service returns an error if the value exceeds the permitted amount for the country. - **bankRepayment** (numeric) - No - COD amount of the shipment. Set to 0 if the shipment does not have a COD amount. - **otherRepayment** (string) - No - Additional information to COD. - **observations** (string) - No - Additional information about the shipment/products (notes). - **openPackage** (boolean) - No - Check the shipment before payment. - **saturdayDelivery** (boolean) - No - Saturday delivery. Not available for some countries. - **referenceNumber** (string) - Yes - Client reference number. Must be unique to avoid duplicate shipments. - **products** (string) - Yes - Shipment content description. - **fragile** (boolean) - No - Marker whether the content is fragile (1 if fragile). Used only for BG. - **productsInfo** (string) - No - Additional product information. - **piecesInPack** (integer) - No - Products amount in one shipment. - **document** (object) - No - Document details. - **content** (base64 binary) - No - PDF content base64 encoded. - **format** (string) - No - Enum: `pdf`. - **customsData** (object) - No - Customs data. - **dutyPaymentInfo** (string) - No - Mandatory for countries outside the European Union. ENUM: `DDU` (Delivery duty unpaid), `DDP` (Delivery duty paid). - **customsValue** (numeric 15.2) - No - Mandatory for countries outside the European Union. - **courierRequest** (object) - No - Courier request details. - **date** (date string) - No - The date on which the courier must visit the address. - **timeFrom** (time string) - No - Starting time of the visit. - **timeTo** (time string) - No - End time of the visit. - **returnLabel** (object) - No - Return label details. ### Request Example ```json { "testMode": true, "senderId": 12345, "courierId": 67890, "waybillAvailableDate": "2023-10-27", "serviceName": "crossborder", "recipient": { "name": "John Doe", "cityId": 101, "countryIsoCode": "US", "streetName": "Main Street", "buildingNumber": 10, "addressText": "Apt 5B", "phoneNumber": "+1234567890", "email": "john.doe@example.com" }, "awb": { "shipmentType": "pack", "parcels": 1, "envelopes": 0, "totalWeight": 5.5, "declaredValue": 100.00, "bankRepayment": 0.00 }, "referenceNumber": "ORDER12345", "products": "Electronics" } ``` ### Response #### Success Response (200) - **waybillId** (string) - The unique ID of the created shipment. - **status** (string) - The status of the shipment creation. #### Response Example ```json { "waybillId": "WB1234567890", "status": "created" } ``` ``` -------------------------------- ### POST /api/v1/createAWB Source: https://documenter.getpostman.com/view/26992907/2s93Y2S2Q8 Creates a new shipment by sending shipment data and an API token. This endpoint is designed for direct integration from your software or website. ```APIDOC ## POST /api/v1/createAWB ### Description Creates a new shipment according to provided the API token and the shipment’s data. This endpoint allows for direct shipment creation requests from your company's software or website. ### Method POST ### Endpoint https://api1.inout.bg/api/v1/createAWB ### Parameters #### Query Parameters - **API_TOKEN** (string) - Required - Bearer token for authentication. #### Request Body - **testMode** (boolean) - Yes - If true, uses the API for testing purposes only. Applies only to the production environment. On the test environment, all shipments are saved in the test environment. - **senderId** (integer) - Yes - ID of the company. Obtain an ID from the Companies Web Service. - **courierId** (integer) - Yes - ID of the courier. Obtain an ID from the Couriers Web Service. - **waybillAvailableDate** (date) - Yes - The date on which the shipment is to be dispatched. - **serviceName** (string) - Yes - The service name must be one of the following: `crossborder`, `eushipmentsairexpress`. - **recipient** (object) - Yes - Recipient details. - **name** (string) - Yes - Name of recipient or company. - **cityId** (integer) - Yes - The ID of a city where the shipment needs to delivery. Obtain an ID from the Cities resource. - **countryIsoCode** (string) - Yes - Two digits country ISO code. - **cityName** (string) - No - City name. Can be used if you have your own city nomenclature. - **zipCode** (string) - No - Zip code. Can be used if you have your own zip code nomenclature. - **region** (string) - No - Required for Romania. Region name. - **streetName** (string) - Yes - Name of the street, office address, or office name. Use 'to office: [office name/address]' for office deliveries. - **buildingNumber** (integer) - Yes - Number of the street/building. - **addressText** (string) - Yes - Additional address information (e.g., block, floor). - **contactPerson** (string) - No - Contact person's name. - **phoneNumber** (string) - Yes - Phone number of the recipient. - **email** (email) - No - Email of the recipient. - **awb** (object) - Yes - Shipment details. - **shipmentType** (string) - No - Enum: `pack` or `pallet`. - **parcels** (integer) - Yes - Number of parcels in the shipment. - **envelopes** (integer) - Yes - Number of envelopes in the shipment. - **pallets** (integer) - No - The number of pallets. - **totalWeight** (numeric) - Yes - Total weight of the shipment in kg. Must equal the sum of all package weights. - **declaredValue** (numeric) - No - Insurance amount of the shipment. - **bankRepayment** (numeric) - Yes - COD amount of the shipment in local currency. Set to 0 if no COD. - **otherRepayment** (string) - No - Additional information for COD. - **observations** (string) - No - Additional information about the shipment/products. - **openPackage** (boolean) - Yes - Allows inspection of the shipment before payment. - **saturdayDelivery** (boolean) - Yes - Enables Saturday delivery (availability may vary by country). - **referenceNumber** (string) - Yes - Client reference number for tracking and reporting. Must be unique to avoid duplicate shipments. - **products** (string) - Yes - Description of the shipment's content (e.g., 'product1 product2'). - **fragile** (boolean) - No - Marker for fragile content (1 if fragile). Used only for Bulgaria. - **productsInfo** (string) - No - Additional product information. - **piecesInPack** (integer) - No - Number of products in one shipment. - **document** (object) - No - Document details. - **content** (base64 binary) - No - PDF content base64 encoded. - **format** (string) - No - Enum: `pdf`. - **packages** (array) - No - Details for individual packages. - **dimensions** (object) - No - Dimensions of a specific parcel. - **width** (numeric) - No - Width in cm. - **height** (numeric) - No - Height in cm. - **length** (numeric) - No - Length in cm. - **weight** (numeric) - No - Weight in kg. ### Request Example ```json { "testMode": true, "senderId": 12345, "courierId": 67890, "waybillAvailableDate": "2023-10-27", "serviceName": "crossborder", "recipient": { "name": "John Doe", "cityId": 111, "countryIsoCode": "BG", "streetName": "Main Street", "buildingNumber": 10, "addressText": "Apt 5", "phoneNumber": "+359888123456", "email": "john.doe@example.com" }, "awb": { "parcels": 1, "envelopes": 0, "totalWeight": 5.5, "bankRepayment": 0, "openPackage": true, "saturdayDelivery": false }, "referenceNumber": "ORDER12345", "products": "Books", "fragile": false, "piecesInPack": 1 } ``` ### Response #### Success Response (200) - **awbNumber** (string) - The generated AWB number for the shipment. - **status** (string) - The status of the shipment creation. #### Response Example ```json { "awbNumber": "1234567890", "status": "success" } ``` ``` -------------------------------- ### POST /api/v1/createAWB Source: https://documenter.getpostman.com/view/26992907/2s93Y2S2Q8 Creates a new shipment by sending shipment data and API token. This endpoint is designed for direct integration with your software or website. ```APIDOC ## POST /api/v1/createAWB ### Description Creates a new shipment according to provided the API token and the shipment’s data. ### Method POST ### Endpoint https://api1.inout.bg/api/v1/createAWB ### Parameters #### Query Parameters - **API_TOKEN** (string) - Required - Bearer token for authentication. #### Request Body - **testMode** (boolean) - Yes - If you want to use the API only for tests set this field to true. Applies only to the production environment. On the test environment, all shipments save on test env. - **senderId** (integer) - Yes - ID of company, obtain an ID from Companies Web Service. - **courierId** (integer) - Yes - ID of courier, obtain an ID from Couriers Web Service. - **waybillAvailableDate** (date) - Yes - The date on which the shipment is to be dispatched. - **serviceName** (string) - Yes - The service name must be one of the following: crossborder, eushipmentsairexpress - **recipient** (object) - Yes - Recipient details. - **name** (string) - Yes - Name of recipient or company. - **cityId** (integer) - Yes - The ID of a city where the shipment needs to delivery. - **countryIsoCode** (string) - No - Two digits country ISO code. - **cityName** (string) - No - City name. - **zipCode** (string) - No - Zip code. - **region** (string) - No - Region. - **streetName** (string) - Yes - Name of the street, office address or office name. - **buildingNumber** (integer) - Yes - Number of the street/building. - **addressText** (string) - Yes - Additional address information. - **contactPerson** (string) - No - Contact person. - **phoneNumber** (string) - Yes - Phone number of the recipient. - **email** (email) - Yes - Email of the recipient. - **awb** (object) - Yes - Shipment details. - **shipmentType** (string) - No - Enum: pack or pallet - **parcels** (integer) - Yes - Number of parcels in the shipment. - **envelopes** (integer) - Yes - Number of envelopes in the shipment. - **pallets** (Integer) - No - The number of pallets. - **totalWeight** (numeric) - Yes - Total weight of the shipment in kg. - **declaredValue** (numeric) - No - Insurance amount of the shipment. - **bankRepayment** (numeric) - No - COD amount of the shipment. - **otherRepayment** (string) - No - Additional information to COD. - **observations** (string) - No - Additional information about the shipment/products. - **openPackage** (boolean) - Yes - Check up the shipment before pay. - **saturdayDelivery** (boolean) - Yes - Saturday delivery. - **referenceNumber** (string) - Yes - Client reference number. Must be unique. - **products** (string) - Yes - The content of the shipment. - **fragile** (boolean) - No - Marker whether the content is fragile. - **productsInfo** (string) - No - Additional product information. - **piecesInPack** (integer) - No - Products amount in one shipment. - **document** (object) - No - Document details. - **content** (base64 binary) - No - PDF content base64 encoded. - **format** (string) - No - Enum: pdf - **customsData** (object) - No - Customs data. - **dutyPaymentInfo** (string) - No - Mandatory for non-EU countries. ENUM: DDU, DDP - **customsValue** (numeric 15.2) - No - Mandatory for non-EU countries. - **courierRequest** (object) - No - Courier request details. - **date** (date string) - No - The date on which the courier must visit the address. - **timeFrom** (time string) - No - Starting time of the visit. - **timeTo** (time string) - No - End time of the visit. - **returnLabel** (object) - No - Return label details. ### Request Example ```json { "testMode": true, "senderId": 12345, "courierId": 67890, "waybillAvailableDate": "2023-10-27", "serviceName": "crossborder", "recipient": { "name": "John Doe", "cityId": 11223, "countryIsoCode": "US", "cityName": "New York", "zipCode": "10001", "region": "NY", "streetName": "Main Street", "buildingNumber": 10, "addressText": "Apt 5B", "contactPerson": "John Doe", "phoneNumber": "123-456-7890", "email": "john.doe@example.com" }, "awb": { "shipmentType": "pack", "parcels": 1, "envelopes": 0, "totalWeight": 5.5, "declaredValue": 100.00, "bankRepayment": 0, "openPackage": true, "saturdayDelivery": false }, "referenceNumber": "ORDER12345", "products": "Books", "fragile": false } ``` ### Response #### Success Response (200) - **success** (boolean) - Indicates if the shipment creation was successful. - **message** (string) - A message describing the result of the operation. - **waybillId** (string) - The unique ID of the created waybill (shipment). #### Response Example ```json { "success": true, "message": "Shipment created successfully.", "waybillId": "WB987654321" } ``` ```