API based OAuth - 2.0
The company enables integration to external systems such as ERPs, CRMs and business sites. Being able to offer advice to your solution.
Check our special projects team and share our expertise to develop solutions tailor- made for your incentive campaign, reward or promotion.
We work focused on gift cards, tickets and vouchers, to give comprehensive solutions to our enterprise customers, from the supply of the cards in ad-hoc requests or on-demand with operational processing and managing logistics door-to-door in Brazil.
Request for HTTP with response in REST
Before starting the integration, you will need to contact the Incentivale team to request the user and password in addition to the campaign token.
Authentication - Request for Access Token
POST: /oauth/token
Parameters:
grant_type: inform "password".
username: Authentication user.
password: Authentication password.
Requirement: This parameter should be sent as "Content-Type: application/x-www-form-urlencoded"
Example received:
{ "access_token": "MU_mz1OelXdFQ4azFQx0-xAd4gM5RXaA4udbuXTEkigg_CENDCbwFgwJQZPxU434a1OEmUmeVhDBFRFc6UpGhjlXRs3a_1WT2STHVZnmHecg3U60fz", "token_type": "bearer", "expires_in": 3599, "userName": "eduardo@v2api.com.br", ".issued": "Thu, 12 May 2016 02:35:13 GMT", ".expires": "Thu, 12 May 2016 03:35:13 GMT" }
The validity time of the token is 60 min.
Search catalog products
GET: /api/v2/products?token=xxxxxxx
Parameters:
Token: Campaign ID.
Example sending:
GET /api/v2/products?token=a17b1c6358454dfeb5fa3fa0d3d592a1 HTTP/1.1 Authorization: Bearer MU_mz1OelXdFQ4azFQx0-xAd4gM5RXaA4udbuXTEkigg_CENDCbwFgwJQZPxU434a1OEmUmeVhDBFRFc6UpGhjlXRs3a_1WT2STHVZnmHecg3U60fz
Example received:
{ "$id": "1", "CodeReturn": 0, "MessageReturn": "Sucesso", "Products": [ { "$id": "2", "SKU": "4", "PriceUN": "132,90", "Name": "CARTÃO PRESENTE ANNA PEGOVA R$ 120,00 ", "Description": "O Cartão Presente Anna Pegova é uma novidade irresistível para quem quer presentear alguém especial. Validade 1 ano.", "Enable": 1, "LinkImage": "https://central.incentivale.com.br/StorangeFiles/86318fd8951c4c4297488edd9debba7d.png", "CategoryId": 1, "Category": "VARIEDADES", "TagFind": "ANNA PEGOVA" }, { "$id": "3", "SKU": "5", "PriceUN": "212,90", "Name": "CARTÃO PRESENTE ANNA PEGOVA R$ 200,00 ", "Description": "O Cartão Presente Anna Pegova é uma novidade irresistível para quem quer presentear alguém especial. Validade 1 ano.", "Enable": 1, "LinkImage": "https://central.incentivale.com.br/StorangeFiles/86318fd8951c4c4297488edd9debba7d.png", "CategoryId": 1, "Category": "VARIEDADES", "TagFind": "ANNA PEGOVA" }, { "$id": "4", "SKU": "6", "PriceUN": "52,90", "Name": "CARTÃO PRESENTE ANNA PEGOVA R$ 40,00 ", "Description": "O Cartão Presente Anna Pegova é uma novidade irresistível para quem quer presentear alguém especial. Validade 1 ano.", "Enable": 1, "LinkImage": "https://central.incentivale.com.br/StorangeFiles/86318fd8951c4c4297488edd9debba7d.png", "CategoryId": 1, "Category": "VARIEDADES", "TagFind": "ANNA PEGOVA" } ] }
Send request
POST: /api/v2/addresquest
Requirement: Requirement: This parameter should be sent as "Content-Type: application/x-www-form-urlencoded"
NAME OF COLUMN | TYPE | LIMIT | FORMAT | REQUERID | OBS |
---|---|---|---|---|---|
Token | ALPHANUMERIC | *** | CAMPAIGN IDENTIFICATION | ||
CodRequest | ALPHANUMERIC | *** | CUSTOMER CONTROL | ||
SKU | NUMERIC | *** | NUMERIC(SKU) OF CATALOG | ||
Name | ALPHANUMERIC | 200 CHARACTERS | NAME OF CLIENT | ||
CPF_CNPJ | ALPHANUMERIC | 30 CHARACTERS | IDENTICATION ID - DOCUMENT | ||
ALPHANUMERIC | 100 CHARACTERS | EMAIL OF CLIENT | |||
Address | ALPHANUMERIC | 100 CHARACTERS | ADDRESS COMPLETE | ||
AddressNumber | ALPHANUMERIC | 30 CHARACTERS | NUMBER OF ADDRESS | ||
AddressComplement | ALPHANUMERIC | 150 CHARACTERS | * | ||
District | ALPHANUMERIC | 255 CHARACTERS | DISTRICT OF ADDRESS | ||
City | ALPHANUMERIC | 50 CHARACTERS | CITY | ||
State | ALPHANUMERIC | 2 CHARACTERS | AL, AK, AR, AZ, CA ... | ||
CEP | ALPHANUMERIC | 20 CHARACTERS | POSTAL CODE COUNTRY | ||
PhoneContact | ALPHANUMERIC | 30 CHARACTERS | PHONE | ||
DateRegister | DATE | *** | YYYY-MM-DD | DATE | |
AmountPremium | NUMERIC | *** | AMOUNT PREMIUM - DEFAULT = 1 |
Example sending:
POST /api/v2/addresquest HTTP/1.1 Accept-Encoding: gzip,deflate Content-Type: application/x-www-form-urlencoded Authorization: Bearer MU_mz1OelXdFQ4azFQx0-xAd4gM5RXaA4udbuXTEkigg_CENDCbwFgwJQZPxU434a1OEmUmeVhDBFRFc6UpGhjlXRs3a_1WT2STHVZnmHecg3U60fz Content-Length: 322 Host: central.incentivale.com.br Connection: Keep-Alive User-Agent: Apache-HttpClient/4.1.1 (java 1.5) Token=a17b1c6358454dfeb5fa3fa0d3d592a1&CodRequest=558788&SKU=49&Name=Eduardo%20Crist%C3%B3v%C3%A3o%20da%20silva&CPF_CNPJ=075.478.769-55&Email=eduardosilva%40gmail.com&Address=Rua%20frederico%20jorge&AddressNumber=255&Complement=Apto%2025%20bloco%20b&District=Centro&City=Blumenau&State=SC&CEP=8978858&PhoneContact=92555699
Example received:
{ "$id": "1", "CodeReturn": 0, "MessageReturn": "Inserido com sucesso.", "PricePremium": 212.9, "PriceFreight": 0, "PriceTotalRequest": 212.9 }
DATAS OF RECEIVED
NAME OF COLUMN | TYPE | FORMAT | INFORMATION |
---|---|---|---|
CodeReturn | NUMERIC |
0 - SUCCESSFULLY INSERTED 1 - ERRO |
|
MessageReturn | ALPHANUMERIC | INFORMATION | |
PricePremium | MONEY | VALUE OF PREMIUM | |
PriceFreight | MONEY | * | |
PriceTotalRequest | MONEY | * | |
DateRequest | DATE | DATE OF PREMIUM/td> |
Check request
POST: /api/v2/existrequest
Requirement: Requirement: This parameter should be sent as "Content-Type: application/x-www-form-urlencoded"
NAME OF COLUMN | TYPE | LIMIT | FORMAT | REQUERID | OBS |
---|---|---|---|---|---|
Token | ALPHANUMERIC | *** | |||
CodRequest | ALPHANUMERIC | *** |
Example sending:
POST /api/v2/existrequest HTTP/1.1 Accept-Encoding: gzip,deflate Content-Type: application/x-www-form-urlencoded Authorization: Bearer MU_mz1OelXdFQ4azFQx0-xAd4gM5RXaA4udbuXTEkigg_CENDCbwFgwJQZPxU434a1OEmUmeVhDBFRFc6UpGhjlXRs3a_1WT2STHVZnmHecg3U60fz Content-Length: 322 Host: central.incentivale.com.br Connection: Keep-Alive User-Agent: Apache-HttpClient/4.1.1 (java 1.5) Token=a17b1c6358454dfeb5fa3fa0d3d592a1&CodRequest=65886
Example received:
{ "$id": "1", "CodeReturn": 0, "MessageReturn": "Sucesso." }
DATAS OF RECEIVED
NAME OF COLUMN | TYPE | FORMAT | INFORMATION |
---|---|---|---|
CodeReturn | NUMERIC |
0 - FOUND 1 - NOT FOUND |
|
MessageReturn | ALPHANUMERIC |
Find request
POST: /api/v2/findrequest
Requisito: Esse parâmetro deve ser enviado como "Content-Type: application/x-www-form-urlencoded"
NAME OF COLUMN | TYPE | FORMAT | INFORMATION | ||
---|---|---|---|---|---|
Token | ALPHANUMERIC | *** | |||
CodRequest | ALPHANUMERIC | *** |
Example sending:
POST /api/v2/findrequest HTTP/1.1 Accept-Encoding: gzip,deflate Content-Type: application/x-www-form-urlencoded Authorization: Bearer MU_mz1OelXdFQ4azFQx0-xAd4gM5RXaA4udbuXTEkigg_CENDCbwFgwJQZPxU434a1OEmUmeVhDBFRFc6UpGhjlXRs3a_1WT2STHVZnmHecg3U60fz Content-Length: 322 Host: central.incentivale.com.br Connection: Keep-Alive User-Agent: Apache-HttpClient/4.1.1 (java 1.5) Token=a17b1c6358454dfeb5fa3fa0d3d592a1&CodRequest=65886
Example received:
{ "$id": "1", "CodeReturn": 0, "MessageReturn": "Sucesso.", "PricePremium": 212.9, "Amount": 3, "PriceFreight": 0, "PriceTotalRequest": 212.9, "DateRequest": "2016-05-11T12:48:36.29" }
DATAS OF RECEIVED
NAME OF COLUMN | TYPE | FORMAT | INFORMATION |
---|---|---|---|
CodeReturn | NUMERIC |
0 - SUCCESS 1 - ERRO |
|
MessageReturn | ALPHANUMERIC | ||
PricePremium | MONEY | ||
Amount | NUMERIC | ||
PriceFreight | MONEY | ||
PriceTotalRequest | MONEY | ||
DateRequest | DATE | YYYY-MM-DDT00:00:00 |
Tracking request
POST: /api/v2/findtracking
Requirement: This parameter should be sent as "Content-Type: application/x-www-form-urlencoded"
NAME OF COLUMN | TYPE | FORMAT | INFORMATION | ||
---|---|---|---|---|---|
Token | ALPHANUMERIC | *** | |||
CodRequest | ALPHANUMERIC | *** |
Example sending:
POST /api/v2/findtracking HTTP/1.1 Accept-Encoding: gzip,deflate Content-Type: application/x-www-form-urlencoded Authorization: Bearer MU_mz1OelXdFQ4azFQx0-xAd4gM5RXaA4udbuXTEkigg_CENDCbwFgwJQZPxU434a1OEmUmeVhDBFRFc6UpGhjlXRs3a_1WT2STHVZnmHecg3U60fz Content-Length: 322 Host: central.incentivale.com.br Connection: Keep-Alive User-Agent: Apache-HttpClient/4.1.1 (java 1.5) Token=a17b1c6358454dfeb5fa3fa0d3d592a1&CodRequest=65886
Exemplo de resposta:
{ "$id": "1", "CodeReturn": 0, "MessageReturn": "Sucesso.", "DateRequest": "2016-05-11T12:48:36.29", "DatePosting": null, "DateDelivery": null, "StatusId": 1, "Status": "Pendente", "Note": null, "Label": null }
DATAS OF RECEIVED
NAME OF COLUMN | TYPE | FORMAT | INFORMATION |
---|---|---|---|
CodeReturn | NUMERIC |
0 - SUCCESS 1 - ERRO |
|
MessageReturn | ALPHANUMERIC | ||
DateRequest | DATE | YYYY-MM-DDT00:00:00 | |
DatePosting | DATE | YYYY-MM-DDT00:00:00 | |
DateDelivery | DATE | YYYY-MM-DDT00:00:00 | |
StatusId | NUMERIC |
1 - PENDING 2 - ENCODED 3 - DELIVERY 4 - RETURNED 5 - FORWARDED 6 - LOSS 7 - CANCELED 8 - WAITINGWITHDRAWAL 9 - SENT |
|
Status | ALPHANUMERIC | INFORMATION OF REQUEST | |
Note | ALPHANUMERIC | ||
Label | ALPHANUMERIC |