Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Header

Required

Description

Content-TypetenantId

Yesapplication/json

Tenant Id

X-API-KEY

Yes

API key for authentication

...

Code Block
{
  "id": "1622203826274",
  "variantId": "14607116304482",
  "stock": 1,
  "shopDomain": "https://www.jbhifi.com.au"
}

Field Description:

  • id (string, required) - The product id.

  • variantId (string, required) - The variant id.

  • stock (integer, required) - The new stock count..shopDomain (string, required) - The shop domain, use to get tenant details in db.

Response:

  • Status code 200 (Automatically send the response if API key is valid and process the update in queue).

  • Status code 401 Unauthorised

Code Block
{
    "type": "https://tools.ietf.org/html/rfc9110#section-15.5.1",
    "title": "One or more validation errors occurred.",
    "status": 401,
    "detail": "Invalid API Key",
    "errors": [
        {
            "error"field": "x-api-key",
            "message": "Invalid API Key"
        }
    ]
}
  • Status code 400 Validation Error403 Forbidden

Code Block
{
    "type": "https://tools.ietf.org/html/rfc9110#section-15.5.1",
    "title": "One or more validation errors occurred.",
    "status": 400,403,
    "detail": "Invalid TenantId: ",
    "errors": [
        {
            "$field": [ "tenantId",
            "message": "Invalid  "JSON deserialization for type 'Preezie.Greenback.Importer.Application.ProductWebhook.Commands.CustomPriceUpdateCommand' was missing required properties including: 'shopDomain'."
    ]TenantId: "
        }
    ]
}
  • Status code 400 Validation Error

Code Block
{
    "type": "https://tools.ietf.org/html/rfc9110#section-15.5.1",
    "title": "One or more validation errors occurred.",
    "status": 400,
    "detail": "Validation errors.",
    "commanderrors": [
        {
            "field": "The command fieldId",
            "message": "Id is required."
     ]   },
     "traceId   {
            "field": "VariantId",
            "message": "00-a63adea0f8289d1b82789107de0bbdf4-888ae9d6b5273ae5-01"VariantId is required."
        }
    ]
}

Product Delete API Endpoint

...

Header

Required

Description

Content-TypetenantId

Yesapplication/json

Tenant Id

X-API-KEY

Yes

API key for authentication

...

Code Block
{
  "id": "1622203826274",
  "shopDomain": "https://www.jbhifi.com.au"
}

Field Description:

  • id (string, required) - The product id.

  • shopDomain (string, required) - The shop domain, use to get tenant details in db.

Response:

  • Status code 200 (Automatically send the response if API key is valid and process the update in queue).

  • Status code 401 Unauthorised

Code Block
{
    "type": "https://tools.ietf.org/html/rfc9110#section-15.5.1",
    "title": "One or more validation errors occurred.",
    "status": 401,
    "detail": "Invalid API Key",
    "errors": [
        {
            "field": "x-api-key",
            "errormessage": "Invalid API Key"
        }
    ]
}
  • Status code 400 Validation Error403 Forbidden

Code Block
{
    "type": "https://tools.ietf.org/html/rfc9110#section-15.5.1",
    "title": "One or more validation errors occurred.",
    "status": 403,
    "detail": "Invalid TenantId: 400",
    "errors": [
        {
            "$field": [ "tenantId",
            "message": "Invalid  "JSON deserialization for type 'Preezie.Greenback.Importer.Application.ProductWebhook.Commands.CustomPriceUpdateCommand' was missing required properties including: 'shopDomain'."
    ]TenantId: "
        }
    ]
}
  • Status code 400 Validation Error

Code Block
{
    "type": "https://tools.ietf.org/html/rfc9110#section-15.5.1",
    "title": "One or more validation errors occurred.",
    "status": 400,
    "detail": "Validation errors.",
    "commanderrors": [
       "The command field {
            "field": "Id",
            "message": "Id is required."
    ]    },
   "traceId": "00-a63adea0f8289d1b82789107de0bbdf4-888ae9d6b5273ae5-01" ]
}

Price Update API Endpoint

...

Header

Required

Description

Content-TypetenantId

Yesapplication/json

Tenant Id

X-API-KEY

Yes

API key for authentication

...

Code Block
{
  "id": "1622203826274",
  "variantId": "14607116304482",
  "price": 500.32,
  "originalPrice": 700.53,
 
"shopDomain": "https://www.jbhifi.com.au"
}

Field Description:

  • id (string, required) - The product id.

  • variantId (string, required) - The variant id.

  • Price (decimal, required) - The new variant price.

  • OriginalPrice (decimal, required) - The new original price for sale.

  • shopDomain (string, required) - The shop domain, use to get tenant details in db.

Response:

  • Status code 200 (Automatically send the response if API key is valid and process the update in queue).

  • Status code 401 Unauthorised

Code Block
{
     "error"type": "https://tools.ietf.org/html/rfc9110#section-15.5.1",
    "title": "One or more validation errors occurred.",
    "status": 401,
    "detail": "Invalid API Key",
    "errors": [
        {
            "field": "x-api-key",
            "message": "Invalid API Key"
        }
    ]
}
  • Status code 400 Validation Error403 Forbidden

Code Block
{
    "type": "https://tools.ietf.org/html/rfc9110#section-15.5.1",
    "title": "One or more validation errors occurred.",
    "status": 403,
    "detail": "Invalid TenantId: 400",
    "errors": [
        {
    "$": [        "field": "tenantId",
            "JSON deserialization for type 'Preezie.Greenback.Importer.Application.ProductWebhook.Commands.CustomPriceUpdateCommand' was missing required properties including: 'shopDomain'."
    ]"message": "Invalid TenantId: "
        }
    ]
}
  • Status code 400 Validation Error

Code Block
{
    "type": "https://tools.ietf.org/html/rfc9110#section-15.5.1",
    "title": "One or more validation errors occurred.",
    "status": 400,
    "detail": "Validation errors.",
    "commanderrors": [
      "The command field  {
            "field": "Id",
            "message": "Id is required."
     ]   },
        {
            "field": "VariantId",
      "traceId      "message": "00-a63adea0f8289d1b82789107de0bbdf4-888ae9d6b5273ae5-01"
}VariantId is required."
        }
    ]
}

Product Create API Endpoint

...

Header

Required

Description

Content-TypetenantId

Yesapplication/json

Tenant Id

X-API-KEY

Yes

API key for authentication

...

Code Block
{
  "product": {
    "id": "string",
    "title": "string",
    "body_html": "string"
    ...
  },
 
"shopDomain": "string"
}

Field Description:

  • product (object, required) - The product object, Can receive different product JSON schema.

  • shopDomain (string, required) - The shop domain, use to get tenant details in db.

Response:

  • Status code 200 (Automatically send the response if API key is valid and process the update in queue).

  • Status code 401 Unauthorised

Code Block
{
    "type": "https://tools.ietf.org/html/rfc9110#section-15.5.1",
    "title": "One or more validation errors occurred.",
    "status": 401,
    "detail": "Invalid API Key",
    "errors": [
        {
            "field": "x-api-key",
            "errormessage": "Invalid API Key"
        }
    ]
}
  • Status code 403 Forbidden

Code Block
{
    "type": "https://tools.ietf.org/html/rfc9110#section-15.5.1",
    "title": "One or more validation errors occurred.",
    "status": 403,
    "detail": "Invalid TenantId: ",
    "errors": [
        {
            "field": "tenantId",
            "message": "Invalid TenantId: "
        }
    ]
}
  • Status code 400 Validation Error

...