younifyd
Menu

Create Transaction

Create Stock Transaction on Product

POST/inventories/{product_uuid}/transactions

Use it in a workflow

  1. Add a step and choose the Elastic Path connector.
  2. Pick the Create Transaction action (under Inventory).
  3. Fill in the fields below, then reference the result from later steps as {{createTransaction.response.data}}.

Request

Path parameters

product_uuidstringrequired

The unique identifier of the product.

Request body

Enter the body as JSON in the step's Body field.

dataobjectrequired
typestringrequired

One ofstock-transactionDefault "stock-transaction"

attributesobjectrequired4 fields
json
{
  "data": {
    "type": "stock-transaction",
    "attributes": {
      "action": "allocate",
      "quantity": 5,
      "product_id": "00000000-0000-0000-0000-000000000000",
      "location": "milton-keynes-warehouse"
    }
  }
}

Response

Returns 201 with an object. Read it in later steps with {{createTransaction.response.data.<field>}}.

dataobject
idstringrequired

The unique identifier.

typestringrequired

One ofstock-transactionDefault "stock-transaction"

attributesobjectrequired4 fields
metaobject1 fields
json
{
  "data": {
    "id": "00000000-0000-0000-0000-000000000000",
    "type": "stock-transaction",
    "attributes": {
      "action": "allocate",
      "product_id": "00000000-0000-0000-0000-000000000000",
      "quantity": 5,
      "location": "milton-keynes-warehouse"
    },
    "meta": {
      "timestamps": {
        "created_at": "2017-01-10T11:41:19.244842Z",
        "updated_at": "2017-01-10T11:41:19.244842Z"
      }
    }
  }
}

Need more? See the Elastic Path guide for connection setup and behaviour shared by every action.

Was this page helpful?