Catalog
Catalog Endpoints
client
| Method | URI | Name | Summary |
|---|---|---|---|
| GET | /v1/categories | get all categories | Get All Categories |
| GET | /v1/products/{currentPage}/{pageSize} | get all products | Get All Products |
| GET | /v1/category/{id} | get category by Id | Get Category By Id |
| GET | /v1/category/slug/{slug} | get category by slug | Get Category By Slug |
| GET | /v1/product/{id} | get product by Id | Get Product By Id |
| GET | /v1/product/sku/{sku} | get product by sku | Get Product By Sku |
| GET | /v1/product/slug/{slug} | get product by slug | Get Product By Slug |
| GET | /v1/products/{categoryId}/{currentPage}/{pageSize} | get products by category Id | Get Products By Category Id |
Paths
Get All Categories (getAllCategories)
GET /v1/categories
returns all categories belonging to a store
All responses
| Code | Status | Description | Has headers | Schema |
|---|---|---|---|---|
| 200 | OK | A successful response. | schema |
Responses
200 - A successful response.
Status: OK
Schema
Get All Products (getAllProducts)
GET /v1/products/{currentPage}/{pageSize}
returns all products belonging to a store
Parameters
| Name | Source | Type | Go type | Separator | Required | Default | Description |
|---|---|---|---|---|---|---|---|
| currentPage | path |
string | string |
✓ | current page number | ||
| pageSize | path |
string | string |
✓ | number of records per page | ||
| sortOn | query |
string | string |
✓ |
All responses
| Code | Status | Description | Has headers | Schema |
|---|---|---|---|---|
| 200 | OK | A successful response. | schema |
Responses
200 - A successful response.
Status: OK
Schema
Get Category By Id (getCategoryById)
GET /v1/category/{id}
returns all categories by id belonging to a store
Parameters
| Name | Source | Type | Go type | Separator | Required | Default | Description |
|---|---|---|---|---|---|---|---|
| id | path |
string | string |
✓ | category id | ||
| id | query |
int64 (formatted integer) | int64 |
✓ |
All responses
| Code | Status | Description | Has headers | Schema |
|---|---|---|---|---|
| 200 | OK | A successful response. | schema |
Responses
200 - A successful response.
Status: OK
Schema
Get Category By Slug (getCategoryBySlug)
GET /v1/category/slug/{slug}
returns all categories by slug belonging to a store
Parameters
| Name | Source | Type | Go type | Separator | Required | Default | Description |
|---|---|---|---|---|---|---|---|
| slug | path |
string | string |
✓ | category slug |
All responses
| Code | Status | Description | Has headers | Schema |
|---|---|---|---|---|
| 200 | OK | A successful response. | schema |
Responses
200 - A successful response.
Status: OK
Schema
Get Product By Id (getProductById)
GET /v1/product/{id}
returns matching product by id
Parameters
| Name | Source | Type | Go type | Separator | Required | Default | Description |
|---|---|---|---|---|---|---|---|
| id | path |
string | string |
✓ | product id |
All responses
| Code | Status | Description | Has headers | Schema |
|---|---|---|---|---|
| 200 | OK | A successful response. | schema |
Responses
200 - A successful response.
Status: OK
Schema
Get Product By Sku (getProductBySku)
GET /v1/product/sku/{sku}
returns all products by sku belonging to a store
Parameters
| Name | Source | Type | Go type | Separator | Required | Default | Description |
|---|---|---|---|---|---|---|---|
| sku | path |
string | string |
✓ | product sku |
All responses
| Code | Status | Description | Has headers | Schema |
|---|---|---|---|---|
| 200 | OK | A successful response. | schema |
Responses
200 - A successful response.
Status: OK
Schema
Get Product By Slug (getProductBySlug)
GET /v1/product/slug/{slug}
returns matching product by slug
Parameters
| Name | Source | Type | Go type | Separator | Required | Default | Description |
|---|---|---|---|---|---|---|---|
| slug | path |
string | string |
✓ | product slug |
All responses
| Code | Status | Description | Has headers | Schema |
|---|---|---|---|---|
| 200 | OK | A successful response. | schema |
Responses
200 - A successful response.
Status: OK
Schema
Get Products By Category Id (getProductsByCategoryId)
GET /v1/products/{categoryId}/{currentPage}/{pageSize}
returns all products by category id belonging to a store
Parameters
| Name | Source | Type | Go type | Separator | Required | Default | Description |
|---|---|---|---|---|---|---|---|
| categoryId | path |
string | string |
✓ | category id | ||
| currentPage | path |
string | string |
✓ | current page number | ||
| pageSize | path |
string | string |
✓ | number of records per page | ||
| sortOn | query |
string | string |
All responses
| Code | Status | Description | Has headers | Schema |
|---|---|---|---|---|
| 200 | OK | A successful response. | schema |
Responses
200 - A successful response.
Status: OK
Schema
GetProductsByCategoryIDResponse
Models
Category
Properties
| Name | Type | Go type | Required | Default | Description | Example |
|---|---|---|---|---|---|---|
| description | string | string |
✓ | description of category | ||
| id | int64 (formatted integer) | int64 |
✓ | category id | ||
| metaDescription | string | string |
✓ | metatag description for SEO | ||
| metaKeywords | string | string |
✓ | metatag keywords for SEO | ||
| metaTitle | string | string |
✓ | metatag title for SEO | ||
| name | string | string |
✓ | name of category | ||
| parentId | int64 (formatted integer) | int64 |
✓ | parent category id. references Category.Id | ||
| slug | string | string |
✓ | slug name of the category | ||
| sortOrder | int32 (formatted integer) | int32 |
✓ | sort order of menu items on the same level and same parent id |
GetAllCategoriesResponse
Properties
| Name | Type | Go type | Required | Default | Description | Example |
|---|---|---|---|---|---|---|
| categories | []Category | []*Category |
✓ | a collection of Category | ||
| status | ResponseStatus | ResponseStatus |
✓ | a ResponseStatus object |
GetAllProductsRequest
Properties
| Name | Type | Go type | Required | Default | Description | Example |
|---|---|---|---|---|---|---|
| currentPage | int64 (formatted integer) | int64 |
✓ | |||
| pageSize | int64 (formatted integer) | int64 |
✓ | |||
| sortOn | string | string |
✓ |
GetAllProductsResponse
Properties
| Name | Type | Go type | Required | Default | Description | Example |
|---|---|---|---|---|---|---|
| products | []Product | []*Product |
✓ | |||
| status | ResponseStatus | ResponseStatus |
✓ | a ResponseStatus object | ||
| totalPages | int64 (formatted integer) | int64 |
✓ | |||
| totalRecords | int64 (formatted integer) | int64 |
✓ |
GetCategoryByIdRequest
Properties
| Name | Type | Go type | Required | Default | Description | Example |
|---|---|---|---|---|---|---|
| id | int64 (formatted integer) | int64 |
✓ |
GetCategoryByIdResponse
Properties
| Name | Type | Go type | Required | Default | Description | Example |
|---|---|---|---|---|---|---|
| category | Category | Category |
✓ | |||
| status | ResponseStatus | ResponseStatus |
✓ | a ResponseStatus object |
GetCategoryBySlugRequest
Properties
| Name | Type | Go type | Required | Default | Description | Example |
|---|---|---|---|---|---|---|
| slug | string | string |
✓ | slug name of the category |
GetCategoryBySlugResponse
Properties
| Name | Type | Go type | Required | Default | Description | Example |
|---|---|---|---|---|---|---|
| category | Category | Category |
✓ | |||
| status | ResponseStatus | ResponseStatus |
✓ | a ResponseStatus object |
GetProductByIdRequest
Properties
| Name | Type | Go type | Required | Default | Description | Example |
|---|---|---|---|---|---|---|
| id | int64 (formatted integer) | int64 |
✓ |
GetProductBySkuRequest
Properties
| Name | Type | Go type | Required | Default | Description | Example |
|---|---|---|---|---|---|---|
| sku | string | string |
✓ |
GetProductBySlugRequest
Properties
| Name | Type | Go type | Required | Default | Description | Example |
|---|---|---|---|---|---|---|
| slug | string | string |
✓ | slug name of the category |
GetProductResponse
Properties
| Name | Type | Go type | Required | Default | Description | Example |
|---|---|---|---|---|---|---|
| product | Product | Product |
✓ | slug name of the category | ||
| status | ResponseStatus | ResponseStatus |
✓ | a ResponseStatus object |
GetProductsByCategoryIdRequest
Properties
| Name | Type | Go type | Required | Default | Description | Example |
|---|---|---|---|---|---|---|
| categoryId | int64 (formatted integer) | int64 |
✓ | |||
| currentPage | int64 (formatted integer) | int64 |
✓ | |||
| pageSize | int64 (formatted integer) | int64 |
✓ | |||
| sortOn | string | string |
GetProductsByCategoryIdResponse
Properties
| Name | Type | Go type | Required | Default | Description | Example |
|---|---|---|---|---|---|---|
| products | []Product | []*Product |
✓ | |||
| status | ResponseStatus | ResponseStatus |
✓ | a ResponseStatus object | ||
| totalPages | int64 (formatted integer) | int64 |
✓ | |||
| totalRecords | int64 (formatted integer) | int64 |
✓ |
JwtToken
Properties
| Name | Type | Go type | Required | Default | Description | Example |
|---|---|---|---|---|---|---|
| accessExpire | int64 (formatted integer) | int64 |
✓ | |||
| accessToken | string | string |
✓ | |||
| refreshAfter | int64 (formatted integer) | int64 |
✓ |
Price
Properties
| Name | Type | Go type | Required | Default | Description | Example |
|---|---|---|---|---|---|---|
| amount | double (formatted number) | float64 |
✓ | price amount | ||
| compareAtAmount | double (formatted number) | float64 |
✓ | price compare amount | ||
| currency | string | string |
✓ | price currency. example: USD, CAN, etc. | ||
| displayAmount | string | string |
✓ | price display amount | ||
| displayCompareAtAmount | string | string |
✓ | price display compare amount | ||
| id | int64 (formatted integer) | int64 |
✓ | price id |
Product
Properties
| Name | Type | Go type | Required | Default | Description | Example |
|---|---|---|---|---|---|---|
| description | string | string |
✓ | category description | ||
| id | int64 (formatted integer) | int64 |
✓ | product id | ||
| metaDescription | string | string |
✓ | metatag description for SEO | ||
| metaKeywords | string | string |
✓ | metatag keywords for SEO | ||
| metaTitle | string | string |
✓ | metatag title for SEO | ||
| name | string | string |
✓ | product name | ||
| shortDescription | string | string |
✓ | product short description. used in category pages | ||
| slug | string | string |
✓ | product slug | ||
| variants | []Variant | []*Variant |
✓ | collection of Variant objects |
ResponseStatus
Properties
| Name | Type | Go type | Required | Default | Description | Example |
|---|---|---|---|---|---|---|
| statusCode | int64 (formatted integer) | int64 |
✓ | RFC http status code, ie. 204, etc - https:go.dev/src/net/http/status.go | ||
| statusMessage | string | string |
✓ | status message |
Variant
Properties
| Name | Type | Go type | Required | Default | Description | Example |
|---|---|---|---|---|---|---|
| depth | double (formatted number) | float64 |
✓ | variant depth. used in calculating shipping | ||
| height | double (formatted number) | float64 |
✓ | variant height. used in calculating shipping | ||
| id | int64 (formatted integer) | int64 |
✓ | variant id | ||
| isDefault | boolean (formatted boolean) | bool |
✓ | is default variant. each product must have exactly 1 default variant | ||
| price | Price | Price |
✓ | variant Price object | ||
| sku | string | string |
✓ | variant sku. usually the product sku with appended identification tags | ||
| weight | double (formatted number) | float64 |
✓ | variant weight. used in calculating shipping | ||
| width | double (formatted number) | float64 |
✓ | variant width. used in calculating shipping |
Feedback
Was this page helpful?
Glad to hear it! Please tell us how we can improve.
Sorry to hear that. Please tell us how we can improve.