Order

Module endpoints

GET /orders

GET https://api.slyk.io/orders

Returns a paginated list of orders.

GET /orders/:id

GET https://api.slyk.io/orders/:id

Gets the order details of the given id.

{
  "data": {
    "amount": "7.00000000",
    "amountWithoutShipment": "6.00000000",
    "amountWithoutTaxes": "6.10000000",
    "assetCode": "eur",
    "bonus": "1.00000000",
    "bonusAssetCode": "eur",
    "canceledAt": null,
    "createdAt": "2020-08-10T10:00:00.000Z",
    "customData": {},
    "deliveryMethod": "shipping",
    "fulfilledAt": null,
    "id": "fc78d28f-a8dd-49de-a22f-722fe3bd26c6",
    "lines": [{
      "assetCode": "eur",
      "bonusAssetCode": "eur",
      "createdAt": "2020-08-10T11:00:00.000Z",
      "fulfilledAt": null,
      "fulfilledQuantity": 1,
      "metadata": {},
      "id": "fc78d28f-a8dd-49de-a22f-722fe3bd26c1",
      "orderId": "fc78d28f-a8dd-49de-a22f-722fe3bd26c6",
      "product": {
        "id": "fc78d28f-a8dd-49de-a22f-722fe3bd26c2",
        "name": "Music t-shirt"
      },
      "productId": "fc78d28f-a8dd-49de-a22f-722fe3bd26c2",
      "quantity": 2,
      "status": "unfulfilled",
      "unitBonus": "0.50000000",
      "unitPrice": "3.50000000",
      "updatedAt": "2020-08-10T12:00:00.000Z"
    }],
    "metadata": {
      "deliveryMethod": "shipping",
      "shippingAmount": "1.00000000",
      "taxesAmount": "0.9000000"
    },
    "orderStatus": "unfulfilled",
    "paidAmount": "0.00000000",
    "paidAt": null,
    "paymentStatus": "unpaid",
    "shippingAmount": "1.00000000",
    "taxesAmount": "0.9000000",
    "trackingId": null,
    "unpaidAmount": "7.00000000",
    "updatedAt": "2020-08-10T10:00:00.000Z",
    "user": {
      "approved": true,
      "email": "waldo@foobar.com",
      "id": "7938e446-1c77-4513-8cb0-8b1f2e9f47b9",
      "imageUrl": "http://slyk.io/waldo-user.png",
      "metadata": {},
      "name": "waldo"
    },
    "userId": "7938e446-1c77-4513-8cb0-8b1f2e9f47b9"
  }
}

GET /orders/:orderId/lines

GET https://api.slyk.io/orders/:id/lines

Returns a paginated list of order lines.

GET /orders/:orderId/lines/:id

GET https://api.slyk.io/orders/:orderId/lines/:id

Gets the order line details of the given id on the order with the given orderId.

{
  "data": {
    "assetCode": "eur",
    "bonusAssetCode": "eur",
    "createdAt": "2020-08-10T11:00:00.000Z",
    "fulfilledAt": null,
    "fulfilledQuantity": 1,
    "id": "fc78d28f-a8dd-49de-a22f-722fe3bd26c8",
    "metadata": {},
    "order": {
      "amount": "1.00000000",
      "assetCode": "eur",
      "bonus": "0.00000000",
      "bonusAssetCode": "eur",
      "canceledAt": null,
      "createdAt": "2020-08-10T10:00:00.000Z",
      "customData": {},
      "fulfilledAt": null,
      "id": "fc78d28f-a8dd-49de-a22f-722fe3bd26c7",
      "metadata": {},
      "orderStatus": "unfulfilled",
      "paidAmount": "0.00000000",
      "paidAt": null,
      "paymentStatus": "unpaid",
      "trackingId": "ec78d28f-a8dd-49de-a22f-722fe3bd26c4",
      "updatedAt": "2020-08-10T12:00:00.000Z"
      "userId": "waldo"
    },
    "orderId": "fc78d28f-a8dd-49de-a22f-722fe3bd26c7",
    "product": {
      "category": {
        "customData": {},
        "description": "Music related things",
        "id": "fc78d28f-a8dd-49de-a22f-722fe3bd26c3",
        "imageUrl": null,
        "metadata": {},
        "thumbnailUrl": null,
        "title": "Music"
      },
      "customData": {},
      "description": null,
      "id": "fc78d28f-a8dd-49de-a22f-722fe3bd26c4",
      "image": null,
      "metadata": {},
      "name": "Music t-shirt",
      "thumbnail": null,
      "typeCode": "digital"
    },
    "productId": "fc78d28f-a8dd-49de-a22f-722fe3bd26c4",
    "quantity": 2,
    "status": "unfulfilled",
    "unitBonus": "0.00000000",
    "unitPrice": "0.50000000",
    "updatedAt": "2020-08-10T12:00:00.000Z"
  }
}

PATCH /orders/:id

PATCH https://api.slyk.io/order/:id

Patches the order details of the given id.

POST /orders

POST https://api.slyk.io/orders

Creates a new order.

Order line request parameters:

POST /orders/:id/cancel

POST http://api.slyk.io/orders/:id/cancel

Cancels the order with the given id.

POST /orders/:id/fulfill

POST http://api.slyk.io/orders/:id/fulfill

Fulfills the order with the given id.

POST /orders/:id/pay

POST http://api.slyk.io/orders/:id/pay

Pays the order with the given id.

POST /orders/:id/unfulfill

POST http://api.slyk.io/orders/:id/unfulfill

Unfulfills the order with the given id.

{
  "data": {
    "amount": "7.00000000",
    "amountWithoutShipment": "6.00000000",
    "amountWithoutTaxes": "6.10000000",
    "assetCode": "eur",
    "bonus": "1.00000000",
    "bonusAssetCode": "eur",
    "canceledAt": null,
    "createdAt": "2020-08-10T10:00:00.000Z",
    "customData": {},
    "deliveryMethod": "shipping",
    "fulfilledAt": null,
    "id": "fc78d28f-a8dd-49de-a22f-722fe3bd26c8",
    "metadata": {
      "deliveryMethod": "shipping",
      "shippingAmount": "1.00000000",
      "taxesAmount": "0.9000000"
    },
    "orderStatus": "unfulfilled",
    "paidAmount": "7.00000000",
    "paidAt": "2020-08-10T12:00:00.000Z",
    "paymentStatus": "paid",
    "shippingAmount": "1.00000000",
    "taxesAmount": "0.9000000",
    "trackingId": null,
    "unpaidAmount": "7.00000000",
    "updatedAt": "2020-08-10T12:00:00.000Z"
    "userId": "fc78d28f-a8dd-49de-a22f-722fe3bd26c2"
  }
}

POST /orders/:orderId/lines/:id/fulfill

POST http://api.slyk.io/orders/:orderId/lines/:id/fulfill

Fulfills the order line with the given id on the order with the given orderId.

POST /orders/:orderId/lines/:id/unfulfill

POST http://api.slyk.io/orders/:orderId/lines/:id/unfulfill

Unfulfills the order line with the given id on the order with the given orderId.

Last updated