PUT v1/ads/specs
Atualizar/Modificar as Especificações de um anúncio já existente
Requires Authorization
To perform authorization, you must submit the authentication credentials using the HTTP Basic authorization header.
The authorization header is constructed as follows:
- The username and password are combined into a string "user:password"
- The resulting literal string is then encoded in Base64
- The authorization method followed by the word "Basic" is then placed before the coded sequence.
Authorization: Basic QWxhZGRpbjpvcGVuLXNlc2FtZQ==
Response Codes
- OK (200)
- BadRequest (400)
- Unauthorized (401)
- NotFound (404)
- NotModified (304)
Request Information
URL Parameters
The parameters must be in the request URL.
Nothing.
Request body parameters
These parameters must be in the request Body.
Name | Description | Type | Additional Information |
---|---|---|---|
AdId | Ad identification code | integer | Required |
Specifications | Specifications of the Ad | NameValueItem array | Required |
Request Formats
application/json, text/json
Notes:
- In Json format, the parameter names follow the camelCase pattern, that is, they always start with lowercase letters.
{ "adId": 1, "specifications": [ { "name": "numero-de-serie", "value": "ABC1234" }, { "name": "cor-predominante", "value": "amarelo" } ] }
text/html
{"adId":1,"specifications":[{"name":"numero-de-serie","value":"ABC1234"},{"name":"cor-predominante","value":"amarelo"}]}
application/x-www-form-urlencoded
Example not available.
Response Information
Resource Description
Name | Description | Type | Additional Information |
---|---|---|---|
AdId | ID code generated by the system | integer | |
ReferenceCode | Reference code provided by the advertiser | string | Required |
Type | Offer type (Venda/Locação/Serviço) | string | Required |
ContractId | Advertiser current Contract ID | integer | Required |
Category | Machine/Equipment Category | string | Required |
Make | Machine/Equipment Manufacturer | string | Required |
Model | Machine/Equipment Model | string | Required |
SerialNumber | Machine/Equipment Serial Number | string | |
Year | Year of manufacture of the machine/equipment (ex. 1998) | integer | |
Price | Price of Ad in Reais (ex. R$ 100.000,00 -> 100000). Only numbers. | integer | |
State | State or Province of location (ex. SP) | string | Required |
City | City of location (ex. Jundiaí) | string | Required |
Description | Ad description (Ex.: pintura nova, pneus bons, cabinada, motor novo). It is forbidden to enter addresses of other sites, telephones and email. | string | |
IsPrivate | Indicates wheter the Ad is private (published only in EmEstoque) | boolean | Required |
SyncToMarketplaces | Indicar se o anúncio deve ser Sincronizado com os Marketplaces disponíveis através do EmEstoque | boolean | |
Photos | List with photos links. Maximum of 4 photos. | string array | Max. Length: 4 |
Specifications | List of the Ad Specifications | NameValueItem array | |
Links | Ad links list | Link array |
Response Formats
application/json, text/json
Notes:
- In Json format, the parameter names follow the camelCase pattern, that is, they always start with lowercase letters.
{ "adId": 1, "referenceCode": "XXXX0123456", "type": "Venda", "contractId": 1, "category": "Escavadeira", "make": "Case", "model": "CX220", "serialNumber": "ABC123456", "year": 2012, "price": 100000, "state": "SP", "city": "Jundiaí", "description": "NONONON NONONON NONONON", "isPrivate": false, "syncToMarketplaces": false, "photos": [ "http://www.yourdomain.com/photo1.jpg", "http://www.yourdomain.com/photo2.jpg", "http://www.yourdomain.com/photo3.jpg", "http://www.yourdomain.com/photo4.jpg" ], "specifications": [ { "name": "numero-de-serie", "value": "ABC1234" }, { "name": "ano-fabricacao", "value": "2012" } ], "links": [ { "href": "https://www.mercadomaquinas.com.br/anuncio/1-test-ad-permalink-slug", "rel": "ad", "type": "GET" }, { "href": "https://api.mercadomaquinas.com.br/v1/ads/1", "rel": "ad api", "type": "GET" } ] }
text/html
{"adId":1,"referenceCode":"XXXX0123456","type":"Venda","contractId":1,"category":"Escavadeira","make":"Case","model":"CX220","serialNumber":"ABC123456","year":2012,"price":100000,"state":"SP","city":"Jundiaí","description":"NONONON NONONON NONONON","isPrivate":false,"syncToMarketplaces":false,"photos":["http://www.yourdomain.com/photo1.jpg","http://www.yourdomain.com/photo2.jpg","http://www.yourdomain.com/photo3.jpg","http://www.yourdomain.com/photo4.jpg"],"specifications":[{"name":"numero-de-serie","value":"ABC1234"},{"name":"ano-fabricacao","value":"2012"}],"links":[{"href":"https://www.mercadomaquinas.com.br/anuncio/1-test-ad-permalink-slug","rel":"ad","type":"GET"},{"href":"https://api.mercadomaquinas.com.br/v1/ads/1","rel":"ad api","type":"GET"}]}