Update Transactions

PUT /v1/transactions/

Replace existing Transaction with updates. Can be done in batch. Max size 500. All dates must be in range 1970-01-01 00:00:00 and 2105-12-31 23:59:59 or null (where applicable)

Body Required

id is required when updating/replacing a Transaction

  • cancelledDate string(date-time)

    Date that the transaction was cancelled

  • channel number Required

    Channel of the transaction (1: D2C, 2: B2B)

  • completedDate string(date-time)

    Date that the transaction was completed

  • createdDate string(date-time) Required

    Date that the transaction was created

  • currencyCode string Required

    Currency Code of transaction (ISO 4217)

  • Name of the Customer (Only used on B2B transactions)

  • The estimated Delivery Date of the transaction

  • External ID of an assosciated cost center. Will be added as a suffix to externalStoreID

  • External Customer ID of the B2B customer

  • JSON body that can be used for integration purposes

  • Reference externalTransactionID of initial transaction when adding returns

  • Additional ExternalID of transaction

  • externalStoreID string Required

    External ID of the store (Store must exist in Madden)

  • externalTransactionID string Required

    The ID of the transaction in the source platform (used to query single transacitons)

  • id integer

    Maddens ID of the transaction (Used as reference on replace)

  • items array[object]

    The items/product rows of the transaction

    Hide items attributes Show items attributes object
    • ageGroup string

      AgeGroup assosciated with the variant

    • brandName string Required

      Brand Name of the variant

    • category string Required

      Category of the variant

    • Collection that the variant belongs to

    • color string

      Color of the variant

    • costPrice number(float)

      Cost Price of the items on transaction row

    • Currency Code of Cost Price (ISO 4217)

    • Any JSON object holding additional filter attributes

    • Name of Delivery Window assosciated with the variant

    • ean string

      Ean of the variant

    • Id of variant in external platform

    • externalItemID string Required

      ExternalItemID the external id of the transaction item

    • Method of fulfillment for transaction item (0: Warehouse, 1: DropShip)

      Default value is 0.

    • gender string

      Gender assosciated with the variant

    • key string Required

      Key used between products, transaction & stock tables. Usually SKU or EAN but needs to be same on all occurrences of the variant

    • Any discounts given on transaction row

    • moneyItemTotalNet number(float) Required

      Total of the items on transaction row ex. VAT

    • moneyItemTotalVat number(float) Required

      Total VAT of the items on the transaction row

    • External ID of the warehouse where items WILL be allocated

    • ProductGroupID of the variant (used to group variants together)

    • productName string Required

      Name of the Product

    • Type of Product (1: Normal/standard, 2: Commission, 3: Local

      Default value is 1.

    • quantity integer Required

      Quantity of the variant purchased

    • season string

      Season that the variant belong to

    • shipments array[object]

      Shipments assosciated with the transaction row

      Hide shipments attributes Show shipments attributes object
    • size string

      Size of the variant

    • sku string

      SKU of the variant

    • supplier string

      Name of the supplier of the variant

    • VariantGroupID of the variant (used to group skus/sizes together)

    • variantName string Required

      Name of the Variant

    • vatValue integer Required

      VAT Percentage on the item

    • Vendors SKU if using own sku structure

    • year string

      Start of the variants life-cycle

  • market string Required

    Market that the transaction was destined for. (Ex. Delivery Country)

  • OrderType of the transaction

  • statements array[object]

    Any fees/discounts applied to the whole transaction that are not directly tied to a transaction item

    Hide statements attributes Show statements attributes object
    • Custom Fields

    • name string

      Name of the Statement

    • priceNet number

      Statement Price (ex VAT)

    • priceVat number

      VAT of statement

    • type number

      Type of the statement (1: Fee, 2: Voucher, 3: Shipping, 4: Service, 5: Giftcard, 6: CartDiscount)

  • type number Required

    Type of the transaction (1: Sale, 2: Return)

Responses

  • OK

    Hide response attributes Show response attributes object
    • cancelledDate string(date-time)

      Date that the transaction was cancelled

    • channel number Required

      Channel of the transaction (1: D2C, 2: B2B)

    • completedDate string(date-time)

      Date that the transaction was completed

    • createdDate string(date-time) Required

      Date that the transaction was created

    • currencyCode string Required

      Currency Code of transaction (ISO 4217)

    • Name of the Customer (Only used on B2B transactions)

    • The estimated Delivery Date of the transaction

    • External ID of an assosciated cost center. Will be added as a suffix to externalStoreID

    • External Customer ID of the B2B customer

    • JSON body that can be used for integration purposes

    • Reference externalTransactionID of initial transaction when adding returns

    • Additional ExternalID of transaction

    • externalStoreID string Required

      External ID of the store (Store must exist in Madden)

    • externalTransactionID string Required

      The ID of the transaction in the source platform (used to query single transacitons)

    • id integer

      Maddens ID of the transaction (Used as reference on replace)

    • items array[object]

      The items/product rows of the transaction

      Hide items attributes Show items attributes object
      • ageGroup string

        AgeGroup assosciated with the variant

      • brandName string Required

        Brand Name of the variant

      • category string Required

        Category of the variant

      • Collection that the variant belongs to

      • color string

        Color of the variant

      • costPrice number(float)

        Cost Price of the items on transaction row

      • Currency Code of Cost Price (ISO 4217)

      • Any JSON object holding additional filter attributes

      • Name of Delivery Window assosciated with the variant

      • ean string

        Ean of the variant

      • Id of variant in external platform

      • externalItemID string Required

        ExternalItemID the external id of the transaction item

      • Method of fulfillment for transaction item (0: Warehouse, 1: DropShip)

        Default value is 0.

      • gender string

        Gender assosciated with the variant

      • key string Required

        Key used between products, transaction & stock tables. Usually SKU or EAN but needs to be same on all occurrences of the variant

      • Any discounts given on transaction row

      • moneyItemTotalNet number(float) Required

        Total of the items on transaction row ex. VAT

      • moneyItemTotalVat number(float) Required

        Total VAT of the items on the transaction row

      • External ID of the warehouse where items WILL be allocated

      • ProductGroupID of the variant (used to group variants together)

      • productName string Required

        Name of the Product

      • Type of Product (1: Normal/standard, 2: Commission, 3: Local

        Default value is 1.

      • quantity integer Required

        Quantity of the variant purchased

      • season string

        Season that the variant belong to

      • shipments array[object]

        Shipments assosciated with the transaction row

        Hide shipments attributes Show shipments attributes object
      • size string

        Size of the variant

      • sku string

        SKU of the variant

      • supplier string

        Name of the supplier of the variant

      • VariantGroupID of the variant (used to group skus/sizes together)

      • variantName string Required

        Name of the Variant

      • vatValue integer Required

        VAT Percentage on the item

      • Vendors SKU if using own sku structure

      • year string

        Start of the variants life-cycle

    • market string Required

      Market that the transaction was destined for. (Ex. Delivery Country)

    • OrderType of the transaction

    • statements array[object]

      Any fees/discounts applied to the whole transaction that are not directly tied to a transaction item

      Hide statements attributes Show statements attributes object
      • Custom Fields

      • name string

        Name of the Statement

      • priceNet number

        Statement Price (ex VAT)

      • priceVat number

        VAT of statement

      • type number

        Type of the statement (1: Fee, 2: Voucher, 3: Shipping, 4: Service, 5: Giftcard, 6: CartDiscount)

    • type number Required

      Type of the transaction (1: Sale, 2: Return)

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

    Hide response attributes Show response attributes object
PUT /v1/transactions/
curl \
 -X PUT https://ma-api.maddenanalytics.com/v1/transactions/ \
 -H "Authorization: $API_KEY" \
 -d '[{"cancelledDate":"null","channel":1,"completedDate":"2022-08-17T17:00:00+02:00","createdDate":"2022-08-17T10:53:53+02:00","currencyCode":"SEK","customerName":"B2B Company Inc","deliveryDate":"2021-11-15T10:15:30Z","externalCostCenterID":"OL","externalCustomerID":"1234-567","externalInfo":"{}","externalParentID":"string","externalRowID":"string","externalStoreID":"store101","externalTransactionID":"779644","id":42,"items":[{"ageGroup":"Senior","brandName":"ACME","category":"Sneakers","collection":"SS21","color":"Black","costPrice":45.5,"costPriceCurrency":"USD","customFields":"{}","deliveryWindow":"IMMEDIATE","ean":"7340192703345","externalID":"99887766","externalItemID":"779644-1000","fulfillmentType":0,"gender":"gender","key":"7340192703345","moneyDiscount":380,"moneyItemTotalNet":3040,"moneyItemTotalVat":760,"primaryWarehouseExternalID":"central-ws","productGroupID":"123456","productName":"Petter","productType":1,"quantity":1,"season":"Spring/Summer","shipments":[{"externalWarehouseID":"central-ws","quantity":1,"shipmentDate":"2022-08-17T16:50:50+02:00","shipmentID":"779644-1"}],"size":"43","sku":"123456-001-43","supplier":"Acme Enterprises AB","variantGroupID":"123456-001","variantName":"Petter Black","vatValue":25,"vendorSKU":"9876543-001-43","year":"2021"}],"market":"Sweden","orderType":"Standard","statements":[{"customFields":"{}","name":"Cart Discount","priceNet":159.2,"priceVat":39.8,"type":6}],"type":1}]'
Request example
[
  {
    "cancelledDate": "null",
    "channel": 1,
    "completedDate": "2022-08-17T17:00:00+02:00",
    "createdDate": "2022-08-17T10:53:53+02:00",
    "currencyCode": "SEK",
    "customerName": "B2B Company Inc",
    "deliveryDate": "2021-11-15T10:15:30Z",
    "externalCostCenterID": "OL",
    "externalCustomerID": "1234-567",
    "externalInfo": "{}",
    "externalParentID": "string",
    "externalRowID": "string",
    "externalStoreID": "store101",
    "externalTransactionID": "779644",
    "id": 42,
    "items": [
      {
        "ageGroup": "Senior",
        "brandName": "ACME",
        "category": "Sneakers",
        "collection": "SS21",
        "color": "Black",
        "costPrice": 45.5,
        "costPriceCurrency": "USD",
        "customFields": "{}",
        "deliveryWindow": "IMMEDIATE",
        "ean": "7340192703345",
        "externalID": "99887766",
        "externalItemID": "779644-1000",
        "fulfillmentType": 0,
        "gender": "gender",
        "key": "7340192703345",
        "moneyDiscount": 380,
        "moneyItemTotalNet": 3040,
        "moneyItemTotalVat": 760,
        "primaryWarehouseExternalID": "central-ws",
        "productGroupID": "123456",
        "productName": "Petter",
        "productType": 1,
        "quantity": 1,
        "season": "Spring/Summer",
        "shipments": [
          {
            "externalWarehouseID": "central-ws",
            "quantity": 1,
            "shipmentDate": "2022-08-17T16:50:50+02:00",
            "shipmentID": "779644-1"
          }
        ],
        "size": "43",
        "sku": "123456-001-43",
        "supplier": "Acme Enterprises AB",
        "variantGroupID": "123456-001",
        "variantName": "Petter Black",
        "vatValue": 25,
        "vendorSKU": "9876543-001-43",
        "year": "2021"
      }
    ],
    "market": "Sweden",
    "orderType": "Standard",
    "statements": [
      {
        "customFields": "{}",
        "name": "Cart Discount",
        "priceNet": 159.2,
        "priceVat": 39.8,
        "type": 6
      }
    ],
    "type": 1
  }
]
Response examples (200)
[
  {
    "cancelledDate": "null",
    "channel": 1,
    "completedDate": "2022-08-17T17:00:00+02:00",
    "createdDate": "2022-08-17T10:53:53+02:00",
    "currencyCode": "SEK",
    "customerName": "B2B Company Inc",
    "deliveryDate": "2021-11-15T10:15:30Z",
    "externalCostCenterID": "OL",
    "externalCustomerID": "1234-567",
    "externalInfo": "{}",
    "externalParentID": "string",
    "externalRowID": "string",
    "externalStoreID": "store101",
    "externalTransactionID": "779644",
    "id": 42,
    "items": [
      {
        "ageGroup": "Senior",
        "brandName": "ACME",
        "category": "Sneakers",
        "collection": "SS21",
        "color": "Black",
        "costPrice": 45.5,
        "costPriceCurrency": "USD",
        "customFields": "{}",
        "deliveryWindow": "IMMEDIATE",
        "ean": "7340192703345",
        "externalID": "99887766",
        "externalItemID": "779644-1000",
        "fulfillmentType": 0,
        "gender": "gender",
        "key": "7340192703345",
        "moneyDiscount": 380,
        "moneyItemTotalNet": 3040,
        "moneyItemTotalVat": 760,
        "primaryWarehouseExternalID": "central-ws",
        "productGroupID": "123456",
        "productName": "Petter",
        "productType": 1,
        "quantity": 1,
        "season": "Spring/Summer",
        "shipments": [
          {
            "externalWarehouseID": "central-ws",
            "quantity": 1,
            "shipmentDate": "2022-08-17T16:50:50+02:00",
            "shipmentID": "779644-1"
          }
        ],
        "size": "43",
        "sku": "123456-001-43",
        "supplier": "Acme Enterprises AB",
        "variantGroupID": "123456-001",
        "variantName": "Petter Black",
        "vatValue": 25,
        "vendorSKU": "9876543-001-43",
        "year": "2021"
      }
    ],
    "market": "Sweden",
    "orderType": "Standard",
    "statements": [
      {
        "customFields": "{}",
        "name": "Cart Discount",
        "priceNet": 159.2,
        "priceVat": 39.8,
        "type": 6
      }
    ],
    "type": 1
  }
]
Response examples (default)
{
  "error": "Error Type (if any)",
  "message": "Message describing the error",
  "statusCode": 400
}