Versions Compared

Key

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

Inventory Update API Endpoint

Purpose:

Allow to update stock level real time.

...

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",
     "error"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",
            "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    {
            "field": "VariantId",
            "message": "00-a63adea0f8289d1b82789107de0bbdf4-888ae9d6b5273ae5-01"
}

...

VariantId is required."
        }
    ]
}

Price Update API Endpoint

Purpose:

Allow to delete update product variant price real time.

API Endpoint Details:

Method

Endpoint

POST

https://dev-greenback-fn-importerwebhook.azurewebsites.net/api/webhooks/

deletes

updates/

product

price

Request Headers:

Header

Required

Description

Content-Type

tenantId

Yes

application/json

Tenant Id

X-API-KEY

Yes

API key for authentication

Request Payload (JSON):

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

Field Description:

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

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

  • Price (decimal, required) - The shop domain, use to get tenant details in dbnew variant price.

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

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": 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 field"Id",
            "message": "Id is required."
     ]   },
        {
            "field": "VariantId",
   "traceId         "message": "00-a63adea0f8289d1b82789107de0bbdf4-888ae9d6b5273ae5-01"
}

...

VariantId is required."
        }
    ]
}

Product Delete API Endpoint (advanced)

Purpose:

Allow to update delete product variant price real time.

API Endpoint Details:

Method

Endpoint

POST

/api/webhooks/

updates

deletes/

price

product

Request Headers:

Header

Required

Description

Content-Type

tenantId

Yes

application/json

Tenant Id

X-API-KEY

Yes

API key for authentication

Request Payload (JSON):

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
{
    "type": "https://tools.ietf.org/html/rfc9110#section-15.5.1",
     "error"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",
            "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" ]
}

Product Create API Endpoint (Advanced)

Purpose:

Allow to create product real time.

API Endpoint Details:

Method

Endpoint

POST

https://dev-greenback-fn-importerwebhook.azurewebsites.net/api/webhooks/creates/product?

Request Headers:

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": [
        {
            "errorfield": "x-api-key",
            "message": "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

...