Skip to main content

Season Endpoints

The Season entity in the fashion context represents a period within the year in which new collections or products are launched. This entity can be essential to differentiate two similar products but from different seasons. If the type of the characteristic is not fashion, a season will not exist in that product.

Common Season Characteristics​

  1. Unique Identification: The Season entity consists of a unique identifier that serves to distinguish it from other seasons and easily reference it. It also has an idRemote field, which refers to the id that may be stored in the client's ERP database.

  2. Season Data: A season has associated information such as description, creation and last update dates, season type, position, etc.

  3. Activities and Logging: Activities performed by a season within the system, such as creation or deletion of resources, may be logged.

Endpoints​

GET/Season/getSeason​

Retrieve all Season entities in database.

Description​

This endpoint retrieves a paginated list of seasons registered in the system. Allows clients to obtain seasonal data based on pagination parameters such as page number (page) and number of items per page (pageSize). The answer includes detailed information about each season.

Parameters​
NameDescriptionTypeDefault Value
idSeason IdInteger optional
pagePage numberInteger1
pageSizeNumber of items per pageInteger10
Responses​
JSON​
{
"data": [
{
"id": "string",
"idRemote": "string",
"description": "string",
"seasonPosition": 0,
"seasonType": "string",
"active": true,
"createdAt": "string",
"updatedAt": "string"
}
],
"pagination": {
"totalItems": 0,
"itemsPerPage": 0,
"currentPage": 0,
"totalPages": 0,
"nextPageUrl": "string"
}
}
XML​
<?xml version="1.0" encoding="UTF-8"?>
<export>
<data>
<item>
<id>string</id>
<idRemote>string</idRemote>
<description>string</description>
<seasonPosition>0</seasonPosition>
<seasonType>string</seasonType>
<active>true</active>
<createdAt>string</createdAt>
<updatedAt>string</updatedAt>
</item>
</data>
<pagination>
<totalItems>0</totalItems>
<itemsPerPage>0</itemsPerPage>
<currentPage>0</currentPage>
<totalPages>0</totalPages>
<nextPageUrl>string</nextPageUrl>
</pagination>
</export>

πŸ‘‰Try it out🌱

POST/Season/create​

Create a new season.

Season Registration in the API: Using the POST Method​

Currently, our POST method in the API exclusively handles JSON format. To effectively register seasons, it is crucial to follow a process that ensures data integrity and proper system functionality.

Details of the POST Method:​

In this endpoint, structured data in JSON format must be provided, including crucial information such as description, season position, season type and additional details as required. The process ensures that each season has a unique identity and is correctly configured to interact with the platform securely and efficiently. The idRemote field provided when creating a new entity corresponds to the idRemote that the user wants to give it and the system will automatically create a local id.

[
{
"idRemote": "string",
"description": "string",
"seasonPos": 0,
"seasonType": "string",
"active": true
}
]

It is possible to add multiple seasons through the same request by separating them with commas within the array in the body of the request.

πŸ‘‰Try it out🌱

PUT/Season/update/{id}​

Updating season

Description​

The PUT method of our API allows clients to update season data using the id parameter. This id field can be either the B2B system's own identifier or the idRemote you provide when registering warehouses on our platform. In this way, our platform guarantees efficient and accurate payment method information management.

It is not necessary to include the entire JSON structure, you just have to send what you want to modify

Parameters​
NameDescriptionType
idSeason identifierString required
Request Body​

The request body must follow the following schema in JSON format:

{
"description": "string",
"seasonPos": 0,
"seasonType": "string",
"active": true
}

πŸ‘‰Try it out🌱

DELETE/Season/delete/{id}​

Removing Season

Description​

The method DELETE allows the deletion of seasons using their unique identifier. This id field can be either the identifier generated by the B2B database or the idRemote you provide when registering seasons. It is important to note that when a season is deleted, it is also removed in the corresponding Order. Once deleted, the Season is recorded in the Deleted History.

Parameters​
NameDescriptionType
idSeason identifierString required

πŸ‘‰Try it out🌱

Possible Response Errors​

ErrorResponse StatusResponse Body
This error occurs when a connection to the database cannot be established. It is an internal server problem.500{"code": 500,"error": "Database connection failed."}
This error occurs when you cannot insert or update items into the database.500{"code": 500,"error": "Invalid connection name, you cannot insert in default"}
This error occurs when a parameter is missing.400{"code": 400,"error": "Parameter $parameter is required"}
This error occurs when you are not authorized.401{"code": 401,"error": "Unauthorized."}
This error occurs when the register could not be found.404{"code": 404,"error": "No entity found for Season with $id."}
This error occurs when you try to insert an entity that already exists.409{"code": 409,"error": "Duplicate entry"}
This error occurs when you try to send too many requests in a short period of time.429{"code": 429,"error": "Too Many Requests"}