GET v1/ads
Retorna todos os anúncios publicados
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)
- Forbidden (403)
- NotFound (404)
Response Information
Resource Description
AdResponse array Returns a list of the advertiser Ads.
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" } ] }, { "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"}]},{"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"}]}]