List Purchase Orders

GET /v2/api/purchaseorders

List all Purchase Orders for an account.

Query parameters

  • page integer

    Page Number

    Minimum value is 1. Default value is 1.

  • pageSize integer

    Page Size

    Default value is 10.

  • global string

    Return purchase orders from all api key origins. Default = false

  • status string

    Filter by delivery status

    Values are all or processing. Default value is all.

  • from string

    Filter by orderDate in layout 2006-01-02T15:04:05Z07:00 or 2006-01-02T15:04:05-0700, inclusive

  • to string

    Filter by orderDate in layout 2006-01-02T15:04:05Z07:00 or 2006-01-02T15:04:05-0700, exclusive

Responses

  • 200 application/json

    OK

    Hide response attributes Show response attributes object
    • cancelledDate string
    • completedDate string
    • deliveryStatus number

      Status of the Delivery (0: Not Delivered, 1: PartiallyDelivered, 2: FullyDelivered, 3: Cancelled)

      Default value is 0.

    • deliveryWindow string

      Delivery Window of the Purchase Order

    • externalComment string

      Any relevant comment

    • externalPurchaseNo string

      External Purchase No

    • factory string

      Factory of the Purchase Order

    • id integer

      Maddens Purcher Order id

    • items array[object]

      The items on the Purchase Order

      Hide items attributes Show items attributes object
      • brandName string

        Name of the products brand

      • deliveries array[object]
        Hide deliveries attributes Show deliveries attributes object
        • deliveryDate string

          The date of the event

        • deliveryID string

          Extenal ID of the delivery

        • quantity integer

          Quantity delivered for the event

      • deliveryDate string

        (Original) DeliveryDate is the initial date that the purchase order item is expected to be delivered. (arrive)

      • departureDate string

        (Original) DepartureDate is the initial date that the purchase order item is expected to leave warehouse.

      • ean string

        EAN of variant

      • externalRowID string

        External id for row

      • externalWarehouseID string Required

        External ID of the warehouse (leave the warehouse)

      • fromExternalWarehouseID string

        From Warehouse External ID (accepted but not exposed)

      • key string Required

        Key, used as a reference to source system.

      • productName string

        Name of product

      • quantity integer

        Quantity ordered

      • revisedDeliveryDate string

        RevisedDeliveryDate is the "actual" date that the purchase order item is expected to be delivered (arrive). Same as ETA

      • revisedDepartureDate string

        RevisedDepartureDate is the "actual" date that the purchase order item is expected to leave warehouse. Same as ETD

      • sku string

        SKU of variant. Should be unique per size/variant

      • supplier string

        Name of the products supplier

      • totalPriceCurrency string

        Currency of order totals

      • totalPriceNet number

        Net total of row

      • totalPriceVat number

        Total VAT of row

    • label string

      External Description/Label of PO

    • orderDate string Required

      Date that the Purchase Order was created

    • orderType string

      Order Type of the Purchase Order

    • transportMethod string

      Transport Method of the Purchase Order

  • default application/json

    All errors will return the same object with a describing code & message

    Hide response attributes Show response attributes object
    • error string
    • message string
    • statusCode integer
GET /v2/api/purchaseorders
curl \
 --request GET 'https://api.maddenanalytics.com/v2/api/purchaseorders' \
 --header "Authorization: $API_KEY"
Response examples (200)
[
  {
    "cancelledDate": "2021-07-19T14:05:22.257Z",
    "completedDate": "2021-07-19T14:05:22.257Z",
    "deliveryStatus": 10,
    "deliveryWindow": "SS24",
    "externalComment": "AW21 - Footwear",
    "externalPurchaseNo": "PO-14534",
    "factory": "Factory B",
    "id": 42,
    "items": [
      {
        "brandName": "Acme",
        "deliveries": [
          {
            "deliveryDate": "2021-10-13T09:05:14.113Z",
            "deliveryID": "RP-14534",
            "quantity": 4
          }
        ],
        "deliveryDate": "2021-07-19T14:05:22.257Z",
        "departureDate": "2021-07-19T14:05:22.257Z",
        "ean": "7340192703345",
        "externalRowID": "21020",
        "externalWarehouseID": "ecom",
        "fromExternalWarehouseID": "central",
        "key": "7340192703345",
        "productName": "Petter",
        "quantity": 4,
        "revisedDeliveryDate": "2021-07-19T14:05:22.257Z",
        "revisedDepartureDate": "2021-07-19T14:05:22.257Z",
        "sku": "123456-001-43",
        "supplier": "Factory B",
        "totalPriceCurrency": "EUR",
        "totalPriceNet": 180,
        "totalPriceVat": 0
      }
    ],
    "label": "string",
    "orderDate": "2021-03-19T14:05:22.257Z",
    "orderType": "Standard",
    "transportMethod": "Air"
  }
]
Response examples (default)
{
  "error": "Error Type (if any)",
  "message": "Message describing the error",
  "statusCode": 400
}