Create Purchase Orders

Add MCP server to your AI tool

Allow AI tools and LLMs to interact with the API documentation portal through MCP.

MCP server URL

https://docs.maddenanalytics.com/mcp

Standard setup for AI tools providing an mcp.json file

mcp.json
{
  "Madden Analytics API MCP server": {
    "url": "https://docs.maddenanalytics.com/mcp"
  }
}

Close
POST /v2/api/purchaseorders

Create new Purchase Orders in batch. Max Batch Size = 500 Purchase Orders

application/json

Body Required

id should be omitted on creation of new orders

  • cancelledDate string
  • completedDate string
  • createdAt string

    Date the Purchase Order was created in Madden

  • 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)

    • id integer
    • 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

    • season string

      Season that the key belong to. Only used for product versioning.

    • 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

  • maDraftPurchaseNo string

    Madden draft Purchase No the order was sent from. Replaces the order Madden sent (batch and create only, not stored)

  • 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

  • updatedAt string

    Date the Purchase Order was last updated in Madden

Responses

  • 201 application/json

    Created

    Hide response attributes Show response attributes object
    • cancelledDate string
    • completedDate string
    • createdAt string

      Date the Purchase Order was created in Madden

    • 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)

      • id integer
      • key string Required

        Key, used as a reference to source system.

      • productFields object

        The SKU the key points at as it is now, with the fields named in productFields. Absent when productFields is not sent or the key matches no SKU. Read-only: ignored when sent on a write.

        Hide productFields attributes Show productFields attributes object
        • ageGroup string

          AgeGroup associated with the product

        • brandName string

          Name of the products brand

        • categoryName string

          Category of product

        • collection string

          Collection that the product belongs to

        • color string

          Color associated with the variant

        • costPrice number

          CostPrice of the variant

        • costPriceCurrency string

          CostPriceCurrency of the variant

        • customFields object

          Custom fields of the product (json)

        • department string

          Department associated with the product

        • ean string

          EAN of variant

        • endDate string

          Date the SKU stops selling (YYYY-MM-DD)

        • externalAttributes object

          External attributes of the product (json)

        • gender string

          Gender associated with the product

        • imageUrl string

          Image of the product

        • info object

          Any info / data needed by the integration (json)

        • key string

          Key used between products, transaction & stock tables, without the season on accounts with versions

        • moq integer

          Minimum Order Quantity of variant

        • packsize integer

          Packsize

        • productGroupID string

          ProductGroupID is used to group products together within Madden

        • productMoq integer

          Minimum Order Quantity of product

        • productName string

          Name of product

        • productType number

          Type of product (1: Normal/standard, 2: Commission, 3: Local)

        • productionLeadTimeDays integer

          Production lead time of the SKU in days

        • season string

          Season that the product belongs to

        • shippingLeadTimeDays integer

          Shipping lead time of the SKU in days

        • size string

          Size associated with the variant

        • sku string

          SKU of product. Unique per size/variant

        • startDate string

          Date the SKU starts selling (YYYY-MM-DD)

        • status number

          Status of the variant (1: Inactive, 2: Active, 3: Outgoing)

        • subCategory string

          Subcategory of product

        • supplier string

          Supplier of the product

        • supplierPrice number

          Price to produce

        • supplierPriceCurrency string

          Currency to produce

        • unitVolume number

          Unit volume of the product in meters (l*w*h) (CBM)

        • variantExternalID string

          ID of variant in external platform

        • variantGroupID string

          VariantGroupID is used to group variants

        • variantName string

          Name of specific variant

        • vatValue number

          Vat Value is the percentage of VAT

        • vendorSKU string

          Vendors SKU if using own sku structure

        • weight number

          Weight of the product in kilograms (kg)

        • year string

          Start of the products life-cycle

      • 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

      • season string

        Season that the key belong to. Only used for product versioning.

      • 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

    • maDraftPurchaseNo string

      Madden draft Purchase No the order was sent from. Replaces the order Madden sent (batch and create only, not stored)

    • 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

    • updatedAt string

      Date the Purchase Order was last updated in Madden

  • 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
POST /v2/api/purchaseorders
curl \
 --request POST 'https://api.maddenanalytics.com/v2/api/purchaseorders' \
 --header "Authorization: $API_KEY" \
 --header "Content-Type: application/json" \
 --data '[
  {
    "cancelledDate": "2021-07-19T14:05:22.257Z",
    "completedDate": "2021-07-19T14:05:22.257Z",
    "createdAt": "2021-03-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",
        "id": 42,
        "key": "7340192703345",
        "productName": "Petter",
        "quantity": 4,
        "revisedDeliveryDate": "2021-07-19T14:05:22.257Z",
        "revisedDepartureDate": "2021-07-19T14:05:22.257Z",
        "season": "Spring/Summer",
        "sku": "123456-001-43",
        "supplier": "Factory B",
        "totalPriceCurrency": "EUR",
        "totalPriceNet": 180,
        "totalPriceVat": 0
      }
    ],
    "label": "string",
    "maDraftPurchaseNo": "MA-1041",
    "orderDate": "2021-03-19T14:05:22.257Z",
    "orderType": "Standard",
    "transportMethod": "Air",
    "updatedAt": "2021-03-19T14:05:22.257Z"
  }
]'
Request examples
[
  {
    "cancelledDate": "2021-07-19T14:05:22.257Z",
    "completedDate": "2021-07-19T14:05:22.257Z",
    "createdAt": "2021-03-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",
        "id": 42,
        "key": "7340192703345",
        "productName": "Petter",
        "quantity": 4,
        "revisedDeliveryDate": "2021-07-19T14:05:22.257Z",
        "revisedDepartureDate": "2021-07-19T14:05:22.257Z",
        "season": "Spring/Summer",
        "sku": "123456-001-43",
        "supplier": "Factory B",
        "totalPriceCurrency": "EUR",
        "totalPriceNet": 180,
        "totalPriceVat": 0
      }
    ],
    "label": "string",
    "maDraftPurchaseNo": "MA-1041",
    "orderDate": "2021-03-19T14:05:22.257Z",
    "orderType": "Standard",
    "transportMethod": "Air",
    "updatedAt": "2021-03-19T14:05:22.257Z"
  }
]
Response examples (201)
[
  {
    "cancelledDate": "2021-07-19T14:05:22.257Z",
    "completedDate": "2021-07-19T14:05:22.257Z",
    "createdAt": "2021-03-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",
        "id": 42,
        "key": "7340192703345",
        "productFields": {
          "ageGroup": "string",
          "brandName": "string",
          "categoryName": "string",
          "collection": "string",
          "color": "string",
          "costPrice": 42.0,
          "costPriceCurrency": "string",
          "customFields": {},
          "department": "string",
          "ean": "string",
          "endDate": "string",
          "externalAttributes": {},
          "gender": "string",
          "imageUrl": "string",
          "info": {},
          "key": "string",
          "moq": 42,
          "packsize": 42,
          "productGroupID": "string",
          "productMoq": 42,
          "productName": "string",
          "productType": 42.0,
          "productionLeadTimeDays": 42,
          "season": "string",
          "shippingLeadTimeDays": 42,
          "size": "string",
          "sku": "string",
          "startDate": "string",
          "status": 42.0,
          "subCategory": "string",
          "supplier": "string",
          "supplierPrice": 42.0,
          "supplierPriceCurrency": "string",
          "unitVolume": 42.0,
          "variantExternalID": "string",
          "variantGroupID": "string",
          "variantName": "string",
          "vatValue": 42.0,
          "vendorSKU": "string",
          "weight": 42.0,
          "year": "string"
        },
        "productName": "Petter",
        "quantity": 4,
        "revisedDeliveryDate": "2021-07-19T14:05:22.257Z",
        "revisedDepartureDate": "2021-07-19T14:05:22.257Z",
        "season": "Spring/Summer",
        "sku": "123456-001-43",
        "supplier": "Factory B",
        "totalPriceCurrency": "EUR",
        "totalPriceNet": 180,
        "totalPriceVat": 0
      }
    ],
    "label": "string",
    "maDraftPurchaseNo": "MA-1041",
    "orderDate": "2021-03-19T14:05:22.257Z",
    "orderType": "Standard",
    "transportMethod": "Air",
    "updatedAt": "2021-03-19T14:05:22.257Z"
  }
]
Response examples (default)
{
  "error": "Error Type (if any)",
  "message": "Message describing the error",
  "statusCode": 400
}