Create a service request
https://carchost.fieldcontrol.com.br/ticketsCreates a pending service request. It becomes a work order when accepted, by sending ticket.id when creating the order.
Requires the
X-Api-Key,User-AgentandContent-Type: application/jsonheaders. Limit: 1 request per second (learn more).
Request
Headers
User-AgentstringrequiredIdentification of your application.
Example: MinhaIntegracao/1.0.
Request body
JSON, sent with the Content-Type: application/json header.
namestringrequiredName of the person who requested the service.
At least 5 characters.
messagestringrequiredRequest message.
subjectstringSubject. When equal to the name of a work order type, it allows identifying requests from corporate customers.
identifierstringRequest number. The # character is reserved.
expiredAtstringRequest expiration date.
externalobjectFields of external
idstringRequest identifier in your system.
Up to 100 characters.Accepts: null.
contactobjectContact of the person who requested the service.
Fields of contact
emailstringphonestringcustomerobjectLinked customer. Only stored on creation.
Fields of customer
idstringserviceobjectLinked work order type. Only stored on creation.
Fields of service
idstringlocationobjectCustomer location, which must belong to the given customer.
Fields of location
idstringproductslist of objectsRequested products. Only considered on creation.
Fields of products
quantitynumberrequiredproductobjectrequiredFields of product
idstringrequiredserviceslist of objectsRequested services. Only considered on creation.
Fields of services
quantitynumberrequiredserviceobjectrequiredFields of service
idstringrequiredscheduleSuggestionslist of objectsDate and time suggestions for the service. Only considered on creation.
Fields of scheduleSuggestions
datestringDate (AAAA-MM-DD).
timestringTime (HH:MM:SS).
contractorobjectContracting company, for requests opened on behalf of third parties. Only considered on creation.
Fields of contractor
namestringrequiredlogoUrlstringrequiredsourcestringrequiredwaypointslist of objectsRoute points, with kmTotal, for travel requests. Only considered on creation.
Fields of waypoints
latitudenumberrequiredlongitudenumberrequiredkmTotalnumberTotal route distance, in km.
routeslist of objectsRoute addresses, in position order. Only considered on creation, together with waypoints and kmTotal.
Fields of routes
positionnumberrequiredpostalCodestringrequiredstreetstringrequirednumberstringAccepts: null.
complementstringAccepts: null.
neighborhoodstringrequiredcitystringrequiredstatestringrequiredformattedAddressstringrequiredcountrystringrequiredplaceNamestringAccepts: null.
placePhonestringAccepts: null.
latitudenumberrequiredlongitudenumberrequiredResponses
- 201
Request created, with the created products and services.
- 401
API key missing (
Missing API Key) or invalid (Invalid API Key). See Authentication. - 403
Account blocked (
Account blocked), expired (Account expired) or on a plan that does not allow integration (Account plan not allowed). See Authentication. - 422
Invalid body (resourceValidationErr):
nameormessagemissing,#in the number, or location that does not belong to the customer. Nonexistent product or service also returns this error (message: product not found). - 429
Limit of 1 request per second exceeded. See Rate limit.
- 500
Unexpected server error.