Apilo

Welcome to the Apilo Help Center.

[API] Orders – downloading list, details. Creating orders

Connection with Shoper Connection with the Allegro account Connection with Erli.pl Connection to the eBay account Connection to the Amazon account Connection with OLX Connection to Empik Connection with Castorama Connection to Decathlon Connection with Black Red White Connection with Media Expert Connection with Aliexpress Connection with TikTok Shop List of inventory – accounting programs that you can connect to Apilo Connection to Hebe Connection to Morele Marketplace Connection to Ceneo.pl Connection to Kaufland DE / PL / CZ / SK / AT / FR / IT Connection to CDiscount Connection with Shopify Connection to Shopify – Authorization via Custom APP method Connection to Etsy.com Connection with InPost Fresh Connection with InPost Von Halsky Connection with IdoSell Connection with Prestashop Connection to WooCommerce Connection with ShopGold Connection to eMag Connection to RedCart Apilo Returns Connection to Gmail Connection with Labelcall Connection with Thunderbird Connection to Magento Connection with the Inpost courier Ship from Allegro, Allegro Smart, Allegro One Connection with DPD courier Connection with the GLS courier Connection with UPS courier Connection with DHL Poland courier Connection with FedEx Poland Connection with FedEx International Connection with courier Poczta Polska Connection to ShipCenter Connection to Amazon Easy Ship Connection with Orlen Paczka Connection with New Colors Connection with Eurohermes Connection to Paxy Connection with Global24 Connection with the courier Rohlig Suus Apilo Warehouse – based on an external inventory and accounting program of the ERP type Connection with the GEODIS (Pekaes) courier Connection with DPD courier (Germany) Connection with DHL (Germany) Connection with the Apaczka broker Connection with the Furgonetka.pl broker Connection to the Erli.pl broker Connection with the broker Olza Logistic Connection with the Meest Post broker Connection with the BliskaPaczka broker List of all couriers and brokers that you will connect to Apilo. Connection with wFirma.pl – invoices and receipts Connection to FakturaXL – invoices Connection with Fakturownia.pl – invoices and receipts Connection with inFakt Connection with Shoper Invoice and Warehouse Connection with iFirma.pl Connection to Subiekt GT – Sellintegro connector Connection with Subiekt GT/Nexo/Nexo Pro – integratory.pl connector Receipts – connecting a fiscal printer EAN barcodes – Barcode scanner Labels – Connecting the label printer and printing labels directly to the printer (PrintNode)

Endpoint

To perform actions on orders, use the endpoint

GET /rest/api/orders/

Retrieving the list of orders

It is recommended to use the filter orderedAfter and isOrderDocument when retrieving the list of orders.

The orderedAfter filter allows you to limit the results to orders placed after a specified date, which can significantly improve the performance and response speed of the API.

The isOrderDocument filter enables filtering of orders that have a sales document, which is useful in the context of specific operations on those documents.

Example:

GET /rest/api/orders/?isOrderDocument=1&orderedAfter=2024-01-01T19%3A55%3A12%2B01%3A00

Downloading Order Details

To obtain order details, use the get_rest_order_documents_detail endpoint.

Make sure you provide the appropriate order identifiers to receive complete and accurate information about the specific order.

Basic order information can also be obtained by providing the id in the filters for the GET /rest/api/orders/ endpoint.

To display order details, please use the GET /rest/api/orders/{id}/ endpoint.

Example:

JSONGET /rest/api/orders/?id=MA240100001r
GET /rest/api/orders/MA240100001

Creating a New Order

To create an order, use the POST /rest/api/orders endpoint. During the order creation, there is an option to provide an order number from an external system. It is important to mention that this number will be visible in related documents, which will facilitate tracking and managing orders in the future.

Example:

POST /rest/api/orders + JSON RequestBody

Updating Order List

After creating a new order using the “`POST /rest/api/orders/“` endpoint, it is necessary to update the order list to reflect changes and avoid duplicates. Here are the steps to take:

  1. Fetch the current order list:

    Use the endpoint
    GET /rest/api/orders/ with the appropriate filters such as orderedAfter and isOrderDocument to retrieve the latest order list.

    Example query: http
    GET /rest/api/orders?orderedAfter=2024-09-01T00:00:00Z&isOrderDocument=true

  2. Checking the newly created order:

    After creating the order using POST /rest/api/orders/, the order number in the integrator’s system should be visible in the response.

    Example query: JSON

    POST /rest/api/orders/?id=MA240100001
    Content-Type: application/json
    {
    "orders": [
    {
    "idExternal": "123321123",
    "isInvoice": false,
    "originalCurrency": "CZK",
    "isEncrypted": false,
    "createdAt": "2024-01-31T10:05:07+0100",
    "updatedAt": "2024-06-17T10:07:23+0200",
    "orderItems": [
    {
    "id": 16,
    "idExternal": null,
    "ean": "978020137962",
    "sku": "123213",
    "originalName": "test product",
    "originalCode": null,
    "originalPriceWithTax": "123.00",
    "originalPriceWithoutTax": "100.00",
    "media": null,
    "quantity": 1,
    "tax": "23.00",
    "status": 1,
    "unit": "t",
    "type": 1
    },
    
    {
    "id": 17,
    "idExternal": null,
    "ean": null,
    "sku": null,
    "originalName": "ManualCarrier",
    "originalCode": "1",
    "originalPriceWithTax": "0.00",
    "originalPriceWithoutTax": "0.00",
    "media": null,
    "quantity": 1,
    "tax": null,
    "status": 1,
    "unit": null,
    "type": 2
    }
    ],
    
    "addressCustomer": {
    "name": "te",
    "phone": "13123123",
    "email": "t@t.com",
    "id": 41,
    "streetName": null,
    "streetNumber": null,
    "city": null,
    "zipCode": null,
    "country": null,
    "department": null,
    "class": "customer"
    },
    "isCanceledByBuyer": null,
    "id": "MA240100001","status": 5}
    ],
    
    "totalCount": 1,
    "currentOffset": 0,
    "pageResultCount": 1
    }
  3. Updating the local order list

    After receiving the response with the order number, update the local order list to include the new order.

    Example response: JSON

    GET /rest/api/orders/?id=MA240100001
    {
    "orders": [
    {
    "idExternal": "123321123",
    "isInvoice": false,
    "originalCurrency": "CZK",
    "isEncrypted": false,
    "createdAt": "2024-01-31T10:05:07+0100",
    "updatedAt": "2024-06-17T10:07:23+0200",
    "orderItems": [
    {
    "id": 16,
    "idExternal": null,
    "ean": "978020137962",
    "sku": "123213",
    "originalName": "test product",
    "originalCode": null,"originalPriceWithTax": "123.00",
    "originalPriceWithoutTax": "100.00",
    "media": null,
    "quantity": 1,
    "tax": "23.00",
    "status": 1,
    "unit": "t",
    "type": 1},{
    "id": 17,
    "idExternal": null,
    "ean": null,
    "sku": null,
    "originalName": "ManualCarrier",
    "originalCode": "1",
    "originalPriceWithTax": "0.00",
    "originalPriceWithoutTax": "0.00",
    "media": null,
    "quantity": 1,
    "tax": null,
    "status": 1,
    "unit": null,
    "type": 2
    }
    ],
    "addressCustomer": {
    "name": "te",
    "phone": "13123123",
    "email": "t@t.com",
    "id": 41,
    "streetName": null,
    "streetNumber": null,
    "city": null,
    "zipCode": null,
    "country": null,
    "department": null,
    "class": "customer"
    },
    "isCanceledByBuyer": null,
    "id": "MA240100001",
    "status": 5
    }
    ],
    "totalCount": 1,
    "currentOffset": 0,
    "pageResultCount": 1
    }
  4. Exclusion of the new order from subsequent queries:

    During subsequent queries to the endpoint GET /rest/api/orders, make sure that the new order is not already included in the results. This can be achieved through appropriate filtering, e.g., using orderedAfter with the creation date of the new order.

    Example query: JSON

    GET /rest/api/orders?orderedAfter=2024-09-05T10:00:00Z&isOrderDocument=1

List of orders with item limit

It is recommended to use the limit filter when retrieving the list of orders. The filter allows limiting the display of results for orders that have a large number of products or related documents.

This guide has been translated using AI-powered tools.

Still need help?

Talk to a support agent