Ir al contenido principal

Content

Midway | Customer Support avatar
Escrito por Midway | Customer Support
Actualizado hace más de 4 meses

This page provides you with information on how to manage your content.

Index:

  • Read and search content

  • Create and update content

  • Delete content

Read and search content

Use the following endpoint to search and read the content we have in the system.

Description

Read and search content

HTTP Method

GET

URL

Headers

X-Tenant:

Authorization: Bearer

Rate limit

60 requests per minute

JSON request (example)

none

JSON response (example)

Paging and filtering (example)

The paging and filters can be combined.

Filtering:

# Search by source https://api.midway.la/api/consumer/content?source=vtex
# Search by channel https://api.midway.la/api/consumer/content?item_id=1
# Search by id https://api.midway.la/api/consumer/content?sku=123
# Search by creation dates. https://api.midway.la/api/consumer/content?created_at_from=2024-01-01&created_at_to=2024-06-01

Paging:

https://api.midway.la/api/consumer/content?source=vtex&item_id=1&page=2&per_page=250

Create and update content

Use the following endpoint to create and update the products of your company in our system, we use the parameter “source” + “item_id” to create or updated the products. You can send many products in one request.

Description

Create and update content.

HTTP Method

POST

URL

Headers

X-Tenant:

Authorization: Bearer

Rate limit

60 requests per minute

Max records

5000 per minute

Reference

See the ProductsDTO table below.

JSON request (example)

JSON response (example)

status code 204

Paging and filtering (example)

none

Delete content

Use the following endpoint to delete the products of your company in our system, we use the parameter “source” + “item_id” to delete. You can send many products in one request to delete.

Descripción

Delete content.

HTTP Method

DELETE

URL

Headers

X-Tenant:

Authorization: Bearer

Rate limit

30 requests per minute

JSON request (example)

JSON response (example)

status code 204

Paging and filtering (example)

none

The parameters that have “*” are required.

ProductsDTO

Parameter

Type

Description

source*

string

The source is from which application the information comes from (vtex, prestashop, system,crm, etc).

products*

List <ProductDTO>

The products field is the list of products to be uploaded in bulk.

ProductDTO

Parameter

Type

Description

item_id*

string

The item_id field is the id of the product in the external system.

sku*

string

The sku field is the sku of the product.

name*

string

The name field is the name of the product.

description*

string

The description field is the description of the product.

content*

string

The content field is the content of the product, this parameter can have HTML.

image

string

The image field is the image of the product, this parameter need to be a link.

link

string

The link field is the link of the product.

tags

List

The tags field is a list of tags of the product.

categories

List

The list of categories that the product belong.

collections

List

The list of collections that the product belong.

stock*

integer

The stock is the stock of the product that you have.

price*

float

The price is the price of the product without discount.

price_sale*

float

The price_sale is the price_sale of the product with discount.

parent_id

string

The parent_id is the id of the parent product.

brand_id

string

The brand_id is the id of the brand product.

brand_name

string

The brand_name is the name of the brand product.

parent_attributes

List

The parent_attributes is a list of information of the product.

sku_attributes

List

The sku_attributes is a list of information of the variant.

made_in

string

The made_in is the origin of the product.

price_details

List

The price_details is a list of price information of the product.

dimensions

The dimensions is the information of the physical product.

date_on_sale_from

string

The date_on_sale_from is relate to the start sale of the product in UTC (Y-m-d H:i:s eg 2024-10-01 09:00:00).

date_on_sale_to

string

The date_on_sale_to is relate to the end sale of the product in UTC (Y-m-d H:i:s eg 2024-10-02 09:00:00).

created_at*

string

The date relate to the creation of the sale in UTC (Y-m-d H:i:s eg 2024-10-01 09:00:00).

updated_at*

string

The date relate to the last updated of the sale in UTC (Y-m-d H:i:s eg 2024-10-01 15:00:00).

¿Ha quedado contestada tu pregunta?