Order Details

Link to swagger documentation

  1. How to get a list of your orders?
  2. How to get the detailed information about an specific order?

How to get a list of your orders?

You can send a GET request to /openapi/v2/orders to get a list of all your orders, their statuses, when they were created and their latest update.

You can also use the filters to define your search. See filters in the Swagger Documentation

If no filter is set up, by default the list is sorted by “updatedAt”: “desc”. By updated it means that any action within the order has happenned (eg. orderorderline status change, new file is attached or orderline was refunded).

Note: $datetime format.

Example:
This request will return a list of your orders in status placed or shipped created between 2021-04-01 10:00:00 and 2021-04-13 12:00:00 sorting in ascending order.

https://app-order-management.sandbox.infra.metro-markets.cloud/openapi/v2/orders?filter%5Bstatus%5D%5B%5D=placed&filter%5Bstatus%5D%5B%5D=shipped&filter%5Bcreated%5D%5Bfrom%5D=2021-04-01T12%3A00%3A00%2B00%3A00&filter%5Bcreated%5D%5Bto%5D=2021-04-13T12%3A00%3A00%2B00%3A00&sort%5BcreatedAt%5D=asc

Response:
You will need the orderId to get the detailed information about the order.

{
    "items": [
        {
            "orderId": "ef6cad08-4f2c-4c39-b65e-1134afa630bc",
            "status": "placed",
            "updatedAt": "2021-04-01T13:32:53+00:00",
            "createdAt": "2021-04-01T13:32:48+00:00"
        },
        {
            "orderId": "66b59abd-9c24-4458-9183-173a667e0330",
            "status": "shipped",
            "updatedAt": "2021-04-12T14:46:20+00:00",
            "createdAt": "2021-04-12T14:46:13+00:00"
        }
    ],
    "totalCount": 2
}

How to get the detailed information about an specific order?

Once you have the orderId you can send a GET request /openapi/v2/orders/{orderId} and you will get all information about the order with all orderlines.

In the swagger documentation you can see a response example and in Model you can see more information about the parameters.

Here we will just highlight some of them:

  • payment
    • method": “open_invoice”:

      "payment": {
      "method": "open_invoice",
      "accountHolder": "RatePAY GmbH", // static value of Marketplace account in the RatePay
      "accountBank": "Commerzbank AG Berlin", //  static value of Marketplace account in the RatePay   
      "accountBic": "COBADEBBXXX", // static value of Marketplace account in the RatePay   
      "accountIban": "DE50100400000201630100", // static value of Marketplace account in the RatePay   
      "paymentReference": "DN0199729L9", //dynamic value,  Ratepay ID id that unique per transaction, you need it when generating the invoice
      "dueDate": "2021-05-06",  //dynamic value, date of transaction expiration, YYYY-MM-DD
      "dueDuration": "P14D"// static value of transaction duration, it means 14 days
      "paymentSystem": null // It's not used at the moment and always null
      }
      
    • method": “credit_card”:

      "payment": {
          "paymentSystem": null, // It's not used at the moment and always null
          "method": "credit_card"
      },
      
    • method": “direct_debit”:

      "payment": {
          "method": "direct_debit",
          "paymentSystem": null,
          "accountHolder": "RatePAY GmbH",
          "accountBank": "Commerzbank AG Berlin",
          "accountBic": "COBADEBBXXX",
          "accountIban": "DE50100400000201630100",
          "paymentReference": "DN0192388G7",
          "dueDate": "2021-04-29",
          "dueDuration": "P14D"
      },
      
    • method": “paypal”:

      "payment": {
          "method": "paypal"
      },  
      
    • method": “sofort”:

      "payment": {
          "method": "sofort"
      },  
      
    • method": “iDEAL”:

      "payment": {
          "method": "ideal",
          "paymentSystem": null
      },  
      
    • buyerDetails

      • type: Consumer / Entrepreneur
      • companyVat: is a proof that the company is registered for VAT and identifies the company for VAT related transactions (as usually reflected in finance documents for cross boarder shipments). Value can be empty.
      • taxNumber: identifies entity to the inland revenue, which is separate from VAT related transactions. According to legal requirements, invoices for purchases within Spain, must have tax reference. You will receive this value with default title “NIF, CIF, NIE". Value can be empty.
      • id: it is a public buyer ID that you can use it to have a history of all orders of a buyer.
      • eInvoice: it´s used to create invoices for B2B buyers in Italy.
      • buyerDetails/address/shipping/stateOrProvince and buyerDetails/address/billing/starteOrProvince: used for Italy.

    • financialDetails: it provides the breakdown of the price (Net, Gross and Vat).

    • orderLines: each item which has been ordered is reflected in an orderLine