Sales

Get sales associated with a store.

get
Authorizations
Path parameters
storeIdstring · flake-idRequiredExample: 411486491630370816
Responses
200
OK
application/json
get
GET /v1/stores/{storeId}/sales HTTP/1.1
Host: 
Authorization: YOUR_API_KEY
Accept: */*
[
  {
    "id": "411486491630370816",
    "store_id": "411486491630370816",
    "enabled": true,
    "name": "text",
    "discount_type": "percent",
    "discount_amount": 1,
    "apply_to_product_ids": [
      "411486491630370816"
    ],
    "apply_to_tag_ids": [
      "411486491630370816"
    ],
    "minimum_order_value": 1,
    "begins_at": "2025-08-01T19:19:39.462Z",
    "ends_at": "2025-08-01T19:19:39.462Z",
    "created_by": {
      "type": "anonymous",
      "id": "411486491630370816"
    },
    "created_at": "2025-08-01T19:19:39.462Z",
    "updated_by": {
      "type": "anonymous",
      "id": "411486491630370816"
    },
    "updated_at": "2025-08-01T19:19:39.462Z"
  }
]

Create a sale by ID for a store

post
Authorizations
Path parameters
storeIdstring · flake-idRequiredExample: 411486491630370816
Body
enabledbooleanRequired
namestringRequired
discount_typestring · enumRequiredPossible values:
discount_amountinteger · int32Required
apply_to_product_idsstring · flake-id[]RequiredExample: 411486491630370816
apply_to_tag_idsstring · flake-id[]RequiredExample: 411486491630370816
minimum_order_valueinteger · int32Required
begins_atstring · date-timeRequired
ends_atstring · date-timeOptional
Responses
200
OK
application/json
post
POST /v1/stores/{storeId}/sales HTTP/1.1
Host: 
Authorization: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 264

{
  "enabled": true,
  "name": "text",
  "discount_type": "percent",
  "discount_amount": 1,
  "apply_to_product_ids": [
    "411486491630370816"
  ],
  "apply_to_tag_ids": [
    "411486491630370816"
  ],
  "minimum_order_value": 1,
  "begins_at": "2025-08-01T19:19:39.462Z",
  "ends_at": "2025-08-01T19:19:39.462Z"
}
{
  "id": "411486491630370816",
  "store_id": "411486491630370816",
  "enabled": true,
  "name": "text",
  "discount_type": "percent",
  "discount_amount": 1,
  "apply_to_product_ids": [
    "411486491630370816"
  ],
  "apply_to_tag_ids": [
    "411486491630370816"
  ],
  "minimum_order_value": 1,
  "begins_at": "2025-08-01T19:19:39.462Z",
  "ends_at": "2025-08-01T19:19:39.462Z",
  "created_by": {
    "type": "anonymous",
    "id": "411486491630370816"
  },
  "created_at": "2025-08-01T19:19:39.462Z",
  "updated_by": {
    "type": "anonymous",
    "id": "411486491630370816"
  },
  "updated_at": "2025-08-01T19:19:39.462Z"
}

Get a sale by ID for a store

get
Authorizations
Path parameters
storeIdstring · flake-idRequiredExample: 411486491630370816
saleIdstring · flake-idRequiredExample: 411486491630370816
Responses
200
OK
application/json
get
GET /v1/stores/{storeId}/sales/{saleId} HTTP/1.1
Host: 
Authorization: YOUR_API_KEY
Accept: */*
{
  "id": "411486491630370816",
  "store_id": "411486491630370816",
  "enabled": true,
  "name": "text",
  "discount_type": "percent",
  "discount_amount": 1,
  "apply_to_product_ids": [
    "411486491630370816"
  ],
  "apply_to_tag_ids": [
    "411486491630370816"
  ],
  "minimum_order_value": 1,
  "begins_at": "2025-08-01T19:19:39.462Z",
  "ends_at": "2025-08-01T19:19:39.462Z",
  "created_by": {
    "type": "anonymous",
    "id": "411486491630370816"
  },
  "created_at": "2025-08-01T19:19:39.462Z",
  "updated_by": {
    "type": "anonymous",
    "id": "411486491630370816"
  },
  "updated_at": "2025-08-01T19:19:39.462Z"
}

Delete a sale by ID for a store

delete
Authorizations
Path parameters
storeIdstring · flake-idRequiredExample: 411486491630370816
saleIdstring · flake-idRequiredExample: 411486491630370816
Responses
204
No Content
delete
DELETE /v1/stores/{storeId}/sales/{saleId} HTTP/1.1
Host: 
Authorization: YOUR_API_KEY
Accept: */*

No content

Update a sale by ID for a store

patch
Authorizations
Path parameters
storeIdstring · flake-idRequiredExample: 411486491630370816
saleIdstring · flake-idRequiredExample: 411486491630370816
Body
enabledbooleanOptional
namestringOptional
discount_typestring · enumOptionalPossible values:
discount_amountinteger · int32Optional
apply_to_product_idsstring · flake-id[]OptionalExample: 411486491630370816
apply_to_tag_idsstring · flake-id[]OptionalExample: 411486491630370816
minimum_order_valueinteger · int32Optional
begins_atstring · date-timeOptional
ends_atstring · date-timeOptional
Responses
200
OK
application/json
patch
PATCH /v1/stores/{storeId}/sales/{saleId} HTTP/1.1
Host: 
Authorization: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 264

{
  "enabled": true,
  "name": "text",
  "discount_type": "percent",
  "discount_amount": 1,
  "apply_to_product_ids": [
    "411486491630370816"
  ],
  "apply_to_tag_ids": [
    "411486491630370816"
  ],
  "minimum_order_value": 1,
  "begins_at": "2025-08-01T19:19:39.462Z",
  "ends_at": "2025-08-01T19:19:39.462Z"
}
{
  "id": "411486491630370816",
  "store_id": "411486491630370816",
  "enabled": true,
  "name": "text",
  "discount_type": "percent",
  "discount_amount": 1,
  "apply_to_product_ids": [
    "411486491630370816"
  ],
  "apply_to_tag_ids": [
    "411486491630370816"
  ],
  "minimum_order_value": 1,
  "begins_at": "2025-08-01T19:19:39.462Z",
  "ends_at": "2025-08-01T19:19:39.462Z",
  "created_by": {
    "type": "anonymous",
    "id": "411486491630370816"
  },
  "created_at": "2025-08-01T19:19:39.462Z",
  "updated_by": {
    "type": "anonymous",
    "id": "411486491630370816"
  },
  "updated_at": "2025-08-01T19:19:39.462Z"
}

Was this helpful?