MasCatalogue Designer API
- Staging environment
- Production environment
- Authentication
- Bearer · JWT
About this API
This API provides the required functionality to manage commercial offer.
It allows to perform operations such as:
-
Load excel files to validate their content and generate the commercial offer included into them.
-
Launch catalogue updates to expose the latest changes to the rest of consumers.
Resources 3
- Loads 6 endpoints
Endpoints to manage commercial offer file loads
- GET Get a list of commercial offer loads
/orgs /{org_id} /loads - POST Load a new commercial offer file
/orgs /{org_id} /loads - GET Get details of the given load
/orgs /{org_id} /loads /{load_id} - GET Download the file associated to the given load
/orgs /{org_id} /loads /{load_id} /file - POST Validate the file of the given load
/orgs /{org_id} /loads /{load_id} /validation
- GET Get a list of commercial offer loads
- Updates 3 endpoints
Endpoints to manage commercial offer updates
- Commercial Devices 1 endpoint
Endpoints to register commercial devices
MasCatalogue Designer API
- Staging environment
- Production environment
- Authentication
- Bearer · JWT
About this API
This API provides the required functionality to manage commercial offer.
It allows to perform operations such as:
-
Load excel files to validate their content and generate the commercial offer included into them.
-
Launch catalogue updates to expose the latest changes to the rest of consumers.
Resources 3
- Loads 6 endpoints
Endpoints to manage commercial offer file loads
- GET Get a list of commercial offer loads
/orgs /{org_id} /loads - POST Load a new commercial offer file
/orgs /{org_id} /loads - GET Get details of the given load
/orgs /{org_id} /loads /{load_id} - GET Download the file associated to the given load
/orgs /{org_id} /loads /{load_id} /file - POST Validate the file of the given load
/orgs /{org_id} /loads /{load_id} /validation
- GET Get a list of commercial offer loads
- Updates 3 endpoints
Endpoints to manage commercial offer updates
- Commercial Devices 1 endpoint
Endpoints to register commercial devices
Release notes
3.7.0
- Add
POST /orgs/{org_id}/commercial_devices(postCommercialDeviceBySegment) to register, idempotently, a non-sellable commercial device by segment. It answers503when it cannot be served right now and can be retried as it is.
3.6.0
- Rename
MANDATORY_COMMERCIAL_DEVICESvalue toCPE_COMMERCIAL_DEVICESinLoadTypeenum - Remove unused
COMMERCIAL_OFFERvalue fromLoadTypeenum
3.5.0
- Add
PROMOTIONSvalue toLoadTypeenum
3.4.1
- Remove
/designerfromLoadsendpoints and refactor the implementation to a separated yaml
3.4.0
- Add
Updateschema and endpoints:GET /updates/{update_id}GET /updatesPOST /update
3.3.2
- Update
Loadschema - Remove unused query params from
GET /loadsendpoint
3.3.1
- Remove all unused endpoints, schemas and parameters
3.3.0
- Add
GET /loads/{load_id}/download_fileendpoint to download the commercial offer file associated with a load
3.2.3
- In
POST /loadsendpoint,typequery param is now mandatory and operationId ispostLoads
3.2.2
- Add
NOT_DEFINEDvalue topromotion_typeandpromotion_categoryenums
3.2.1
- Rename
load_typequery param astypeinGET /loadsendpoint - Add
offsetlimitandsortquery params inGET /loadsendpoint - Add filter params in
GET /loadsendpoint
3.2.0
- Change the
loadstable with the following changes:- Rename
user_loadtocreated_by - Rename
user_validationtovalidated_by - Rename
user_executiontoexecuted_by - Rename
load_request_datetocreated_at
- Rename
3.1.0
- Modify
GET /loadsendpoint to paginate the response - Rename
LoadResponseasLoad - Remove
tenantfield fromLoadresponse
3.0.0
- Initial release of the Designer module.
Loads
Get a list of commercial offer loads
/orgs /{org_id} /loads Authenticated with a bearer token in the Authorization header Authentication
Path parameters
org_idstringRequiredOrganization name
Query parameters
offsetinteger (int32)The number of elements to skip before starting to collect the result set.
It can be used in combination with the limit parameter to control the
pagination of the result set.
limitinteger (int32)The number of elements to return in the result set. It can be used in combination with the offset parameter to control the pagination of the result set.
typestringstatusstringCurrent status of the load
created_bystringUser who created the load
Responses
OK
-
itemsobject[] Required-
idstring (uuid) RequiredLoad unique identifier
-
statusstring RequiredCurrent status of the load
-
status_detailstringAdditional information about the load status
-
typestring RequiredType of offer generated by the load
-
file_namestring RequiredName of the file
-
created_bystring (email) RequiredUsername who created the load
-
created_atstring (date-time) RequiredDatetime when load was created (format: YYYY-MM-DDThh:mm:ss.000Z)
-
validated_bystring (email)Username who requested the validation
-
validation_started_atstring (date-time)Datetime when validation has started (format: YYYY-MM-DDThh:mm:ss.000Z)
-
validation_finished_atstring (date-time)Datetime when validation has finished (format: YYYY-MM-DDThh:mm:ss.000Z)
-
executed_bystring (email)Username who requested the execution
-
execution_started_atstring (date-time)Datetime when execution has started (format: YYYY-MM-DDThh:mm:ss.000Z)
-
execution_finished_atstring (date-time)Datetime when execution has finished (format: YYYY-MM-DDThh:mm:ss.000Z)
-
-
paginationobject Required-
totalinteger (int32) Required -
offsetinteger (int32) Required -
limitinteger (int32) Required
-
Bad request
-
errorstring -
messagestring -
codestring
Unauthorized
Loads
Load a new commercial offer file
/orgs /{org_id} /loads Authenticated with a bearer token in the Authorization header Authentication
Path parameters
org_idstringRequiredOrganization name
Query parameters
typestringRequired
Request body multipart/form-data Required
file
-
filestring (binary) RequiredDocument content in binary format
Responses
Load created successfully
-
idstring (uuid) Required
Bad request
-
errorstring -
messagestring -
codestring
Unauthorized
Loads
Get details of the given load
/orgs /{org_id} /loads /{load_id} Authenticated with a bearer token in the Authorization header Authentication
Path parameters
org_idstringRequiredOrganization name
load_idstring (uuid)RequiredUnique identifier of the load
Responses
OK
-
idstring (uuid) RequiredLoad unique identifier
-
statusstring RequiredCurrent status of the load
-
status_detailstringAdditional information about the load status
-
typestring RequiredType of offer generated by the load
-
file_namestring RequiredName of the file
-
created_bystring (email) RequiredUsername who created the load
-
created_atstring (date-time) RequiredDatetime when load was created (format: YYYY-MM-DDThh:mm:ss.000Z)
-
validated_bystring (email)Username who requested the validation
-
validation_started_atstring (date-time)Datetime when validation has started (format: YYYY-MM-DDThh:mm:ss.000Z)
-
validation_finished_atstring (date-time)Datetime when validation has finished (format: YYYY-MM-DDThh:mm:ss.000Z)
-
executed_bystring (email)Username who requested the execution
-
execution_started_atstring (date-time)Datetime when execution has started (format: YYYY-MM-DDThh:mm:ss.000Z)
-
execution_finished_atstring (date-time)Datetime when execution has finished (format: YYYY-MM-DDThh:mm:ss.000Z)
Bad request
-
errorstring -
messagestring -
codestring
Unauthorized
Resource not found
-
errorstring -
messagestring -
codestring
Loads
Download the file associated to the given load
/orgs /{org_id} /loads /{load_id} /file Path parameters
org_idstringRequiredOrganization name
load_idstring (uuid)RequiredUnique identifier of the load
Responses
Successfully downloaded
Bad request
-
errorstring -
messagestring -
codestring
Unauthorized
Resource not found
-
errorstring -
messagestring -
codestring
Loads
Validate the file of the given load
/orgs /{org_id} /loads /{load_id} /validation Authenticated with a bearer token in the Authorization header Authentication
Path parameters
org_idstringRequiredOrganization name
load_idstring (uuid)RequiredUnique identifier of the load
Responses
Request has been accepted.
No body.
Unauthorized
Resource not found
-
errorstring -
messagestring -
codestring
Conflict
-
errorstring -
messagestring -
codestring
Loads
Execute the file of the given load
/orgs /{org_id} /loads /{load_id} /execution Authenticated with a bearer token in the Authorization header Authentication
Path parameters
org_idstringRequiredOrganization name
load_idstring (uuid)RequiredUnique identifier of the load
Responses
Request has been accepted.
No body.
Unauthorized
Resource not found
-
errorstring -
messagestring -
codestring
Conflict
-
errorstring -
messagestring -
codestring
Updates
Get all the commercial offer updates requests for all tenants
/orgs /{org_id} /updates Authenticated with a bearer token in the Authorization header Authentication
Get all the commercial offer updates requests for all tenants
Path parameters
org_idstringRequiredOrganization name
Query parameters
offsetinteger (int32)The number of elements to skip before starting to collect the result set.
It can be used in combination with the limit parameter to control the
pagination of the result set.
limitinteger (int32)The number of elements to return in the result set. It can be used in combination with the offset parameter to control the pagination of the result set.
statusstringCurrent status of the update
created_bystringUser who created the update
Responses
OK
-
itemsobject[] Required-
idstring (uuid) RequiredUpdate unique identifier
-
statusstring RequiredCurrent status of the update
-
status_detailstringAdditional information about the update status
-
created_bystring RequiredUsername who created the update
-
created_atstring (date-time) RequiredDatetime when update was created (format: YYYY-MM-DDThh:mm:ss.000Z)
-
finished_atstring (date-time)Datetime when update has finished (format: YYYY-MM-DDThh:mm:ss.000Z)
-
-
paginationobject Required-
totalinteger (int32) Required -
offsetinteger (int32) Required -
limitinteger (int32) Required
-
Bad request
-
errorstring -
messagestring -
codestring
Unauthorized
Updates
Request commercial offer update for all tenants
/orgs /{org_id} /updates Authenticated with a bearer token in the Authorization header Authentication
Request commercial offer update for all tenants
Path parameters
org_idstringRequiredOrganization name
Responses
Update created successfully
-
idstring (uuid) Required
Bad request
-
errorstring -
messagestring -
codestring
Unauthorized
Updates
Get the information for a particular catalogue update request
/orgs /{org_id} /updates /{update_id} Authenticated with a bearer token in the Authorization header Authentication
Get the information for a particular catalogue update request specified by {update_id}
Path parameters
org_idstringRequiredOrganization name
update_idstring (uuid)RequiredUnique identifier of the update
Responses
OK
-
idstring (uuid) RequiredUpdate unique identifier
-
statusstring RequiredCurrent status of the update
-
status_detailstringAdditional information about the update status
-
created_bystring RequiredUsername who created the update
-
created_atstring (date-time) RequiredDatetime when update was created (format: YYYY-MM-DDThh:mm:ss.000Z)
-
finished_atstring (date-time)Datetime when update has finished (format: YYYY-MM-DDThh:mm:ss.000Z)
Bad request
-
errorstring -
messagestring -
codestring
Unauthorized
Resource not found
-
errorstring -
messagestring -
codestring
Commercial Devices
Registers a non-sellable commercial device by segment
/orgs /{org_id} /commercial_devices Authenticated with a bearer token in the Authorization header Authentication
Registers a commercial device for the given device and segment. The offer starts and ends at the moment it is registered, so it is
never sellable.
The operation is idempotent. If an equal offer is already registered (same device, segment and amounts; the campaign is not part of
the comparison), nothing new is registered and the identifier of the existing one is returned. The reused offer may have a
different external_campaign_id than the one requested.
When another equal offer is being registered at the same moment and this one cannot wait for it, the request is rejected with 503
and can be retried as it is.
Requests without the catalogue.designer.write permission are rejected with 401.
Path parameters
org_idstringRequiredOrganization name
Request body application/json Required
-
device_idstring RequiredERP identifier of the device in the catalogue of the organization
-
segment_idstring RequiredSegment the offer is registered for
-
upfront_feenumber RequiredAmount paid upfront, with at most two decimals
-
installment_durationinteger (int32) RequiredNumber of installments
-
installment_feenumber RequiredAmount of every installment but the last one, with at most two decimals. At least one of
installment_feeandlast_installment_feemust be greater than 0 -
last_installment_feenumber RequiredAmount of the last installment, with at most two decimals
-
permanence_durationinteger (int32) | nullMonths of permanence. Informed together with
permanence_penalty, or both null -
permanence_penaltynumber | nullPenalty for breaking the permanence, with at most two decimals. Informed together with
permanence_duration, or both null -
external_campaign_idstring | nullExternal campaign of the offer. Informed together with
permanence_durationandpermanence_penalty, or omitted (or null) when the offer has no permanence
Responses
An equal offer was already registered; its identifier is returned. The reused offer may have a
different external_campaign_id than the one requested, as it is not part of the uniqueness key.
-
idstring (uuid) RequiredIdentifier of the commercial device by segment
The offer has been registered.
-
idstring (uuid) RequiredIdentifier of the commercial device by segment
Bad request
-
errorstring -
messagestring -
codestring
Unauthorized
Resource not found
-
errorstring -
messagestring -
codestring
Service temporarily unavailable. The request can be retried as it is
-
errorstring -
messagestring -
codestring