Introdução

A API de integração do ClearSale permite que os integradores enviem pedidos para análise de acordo com o tipo de produto contratado. Através da API é possível enviar pedidos e consultar informações relevantes da análise da ClearSale.

Introduction

The ClearSale's API allows your company to submit orders and consult relevant information from ClearSale's analysis according to the contracted product.


Inclusão de Pedidos

Requisição
POST https://api.clearsale.com.br/v1/orders/
Content-Type: application/json
Authorization: Bearer {TOKEN}
{
	"code": "ORDER_EXAMPLE_2_0_1",
	"sessionID": "SessionIDValue",
	"date": "2017-03-22T13:38:59.9894222",
	"email": "email@email.com.br",
	"b2bB2c": "B2C",
	"itemValue": 10.00,
	"totalValue": 15.00,
	"numberOfInstallments": 1,
	"ip": "192.168.0.1",
	"isGift": false,
	"giftMessage": "Message Example",
	"observation": "Observation example",
	"status": 0,
	"origin": "Origin example",
	"channelID": "Additional origin information",
	"reservationDate": "2017-03-21T22:36:36.0000000",
	"country": "Brasil",
	"nationality": "Brasileiro",
	"product": 1,
	"customSla": 60,
	"bankAuthentication": "Aprovado 3DS",
	"subAcquirer": "Sub Acquirer Name",
	"list": {
		"typeID": 3,
		"id": "List Code Example"
	},
	"purchaseInformation": {
		"lastDateInsertedMail": "2015-03-01T02:40:00",
		"lastDateChangePassword": "2015-04-02T05:15:00",
		"lastDateChangePhone": "2015-05-03T10:45:00",
		"lastDateChangeMobilePhone": "2015-06-04T12:05:00",
		"lastDateInsertedAddress": "2015-07-05T15:25:00",
		"purchaseLogged": false,
		"email": "email@pemail.com.br",
		"login": "SocialNetworkLogin"
	},
	"socialNetwork": {
		"optInCompreConfie": 1,
		"typeSocialNetwork": 2,
		"authenticationToken": "123456abcd"
	},
	"billing": {
		"clientID": "Client123",
		"type": 1,
		"primaryDocument": "12345678910",
		"secondaryDocument": "12345678",
		"name": "Complete Client Name",
		"birthDate": "1990-01-10T00:00:00.000",
		"email": "email@email.com.br",
		"gender": "M",
		"address": {
			"street": "Street name example",
			"number": "100",
			"additionalInformation": "Additional information example",
			"county": "County Example",
			"city": "City Example",
			"state": "SP",
			"zipcode": "12345678",
			"country": "Brasil",
			"reference": "Address reference example"
		},
		"phones": [{
				"type": 1,
				"ddi": 55,
				"ddd": 11,
				"number": 33333333,
				"extension": "1111"
			}
		]
	},
	"shipping": {
		"clientID": "Client123",
		"type": 1,
		"primaryDocument": "12345678910",
		"secondaryDocument": "12345678",
		"name": "Complete Client Name",
		"birthDate": "1990-01-10T00:00:00.000",
		"email": "email@email.com.br",
		"gender": "M",
		"address": {
			"street": "Street name example",
			"number": "100",
			"additionalInformation": "Additional information example",
			"county": "County Example",
			"city": "City Example",
			"state": "SP",
			"zipcode": "12345678",
			"country": "Brasil",
			"reference": "Address reference example"
		},
		"phones": [{
				"type": 1,
				"ddi": 55,
				"ddd": 11,
				"number": 33333333,
				"extension": "1111"
			}
		],
		"deliveryType": "1",
		"deliveryTime": "2 dias úteis",
		"price": 5.00,
		"pickUpStoreDocument": "12345678910"
	},
	"payments": [{
			"sequential": 1,
			"date": "2017-03-21T22:36:53.0000000",
			"value": 25.00,
			"type": 1,
			"installments": 1,
			"interestRate": 10,
			"interestValue": 2.00,
			"currency": 986,
			"voucherOrderOrigin": "123456",
			"card": {
				"number": "123456xxxxxx1234",
				"hash": "12345678945612301234569874563210",
				"bin": "123456",
				"end": "1234",
				"type": 1,
				"validityDate": "02/2021",
				"ownerName": "Owner Card Name",
				"document": "12345678910",
				"nsu": "12345"
			},
			"address": {
				"street": "Street name example",
				"number": "10",
				"additionalInformation": "Additional information example",
				"county": "County Example",
				"city": "City Example",
				"state": "SP",
				"zipcode": "12345678",
				"country": "Brasil",
				"reference": "Address reference example"
			}
		}
	],
	"items": [{
			"code": "Item Code",
			"name": "Item description",
			"barCode": "1234567891012",
			"value": 10.00,
			"amount": 1,
			"categoryID": 1,
			"categoryName": "Item category name",
			"isGift": true,
			"sellerName": "Seller Name",
			"sellerDocument": "12345678910123",
			"isMarketPlace": "true",
			"sellerSegment": "Eletronicos",
			"shippingCompany": "Shipping Company Name"
		}
	],
	"passengers": [{
			"name": "Passanger name",
			"companyMileCard": "Company Name",
			"mileCard": "123456789",
			"identificationType": 1,
			"identificationNumber": "123456789",
			"gender": "M",
			"birthdate": "1990-01-10T00:00:00.000",
			"cpf": "12345678910"
		}
	],
	"connections": [{
			"company": "JJ",
			"identificationNumber": 12345,
			"date": "2017-10-10T00:00:00.000",
			"seatClass": "Seat Class",
			"origin": "GRU",
			"destination": "LHR",
			"boarding": "2017-10-10T00:00:00.000",
			"arriving": "2017-10-10T00:00:00.000",
			"fareClass": "First Class"
		}
	],
	"hotels": [{
			"name": "Hotel Name",
			"city": "Hotel City",
			"state": "Hotel State",
			"country": "Hotel Country",
			"reservationDate": "2017-10-10T00:00:00.000",
			"reserveExpirationDate": "2017-10-10T00:00:00.000",
			"checkInDate": "2017-10-10T00:00:00.000",
			"checkOutDate": "2017-10-10T00:00:00.000"
		}
	]
}
POST https://homologacao.clearsale.com.br/api/v1/orders/
Content-Type: application/json
Authorization: Bearer {TOKEN}
{
	"code": "ORDER_EXAMPLE_2_0_1",
	"sessionID": "SessionIDValue",
	"date": "2017-03-22T13:38:59.9894222",
	"email": "email@email.com.br",
	"b2bB2c": "B2C",
	"itemValue": 10.00,
	"totalValue": 15.00,
	"numberOfInstallments": 1,
	"ip": "192.168.0.1",
	"isGift": false,
	"giftMessage": "Message Example",
	"observation": "Observation example",
	"status": 0,
	"origin": "Origin example",
	"channelID": "Additional origin information",
	"reservationDate": "2017-03-21T22:36:36.0000000",
	"country": "Brasil",
	"nationality": "Brasileiro",
	"product": 1,
	"customSla": 60,
	"bankAuthentication": "Aprovado 3DS",
	"subAcquirer": "Sub Acquirer Name",
	"list": {
		"typeID": 3,
		"id": "List Code Example"
	},
	"purchaseInformation": {
		"lastDateInsertedMail": "2015-03-01T02:40:00",
		"lastDateChangePassword": "2015-04-02T05:15:00",
		"lastDateChangePhone": "2015-05-03T10:45:00",
		"lastDateChangeMobilePhone": "2015-06-04T12:05:00",
		"lastDateInsertedAddress": "2015-07-05T15:25:00",
		"purchaseLogged": false,
		"email": "email@pemail.com.br",
		"login": "SocialNetworkLogin"
	},
	"socialNetwork": {
		"optInCompreConfie": 1,
		"typeSocialNetwork": 2,
		"authenticationToken": "123456abcd"
	},
	"billing": {
		"clientID": "Client123",
		"type": 1,
		"primaryDocument": "12345678910",
		"secondaryDocument": "12345678",
		"name": "Complete Client Name",
		"birthDate": "1990-01-10T00:00:00.000",
		"email": "email@email.com.br",
		"gender": "M",
		"address": {
			"street": "Street name example",
			"number": "100",
			"additionalInformation": "Additional information example",
			"county": "County Example",
			"city": "City Example",
			"state": "SP",
			"zipcode": "12345678",
			"country": "Brasil",
			"reference": "Address reference example"
		},
		"phones": [{
				"type": 1,
				"ddi": 55,
				"ddd": 11,
				"number": 33333333,
				"extension": "1111"
			}
		]
	},
	"shipping": {
		"clientID": "Client123",
		"type": 1,
		"primaryDocument": "12345678910",
		"secondaryDocument": "12345678",
		"name": "Complete Client Name",
		"birthDate": "1990-01-10T00:00:00.000",
		"email": "email@email.com.br",
		"gender": "M",
		"address": {
			"street": "Street name example",
			"number": "100",
			"additionalInformation": "Additional information example",
			"county": "County Example",
			"city": "City Example",
			"state": "SP",
			"zipcode": "12345678",
			"country": "Brasil",
			"reference": "Address reference example"
		},
		"phones": [{
				"type": 1,
				"ddi": 55,
				"ddd": 11,
				"number": 33333333,
				"extension": "1111"
			}
		],
		"deliveryType": "1",
		"deliveryTime": "2 dias úteis",
		"price": 5.00,
		"pickUpStoreDocument": "12345678910"
	},
	"payments": [{
			"sequential": 1,
			"date": "2017-03-21T22:36:53.0000000",
			"value": 25.00,
			"type": 1,
			"installments": 1,
			"interestRate": 10,
			"interestValue": 2.00,
			"currency": 986,
			"voucherOrderOrigin": "123456",
			"card": {
				"number": "123456xxxxxx1234",
				"hash": "12345678945612301234569874563210",
				"bin": "123456",
				"end": "1234",
				"type": 1,
				"validityDate": "02/2021",
				"ownerName": "Owner Card Name",
				"document": "12345678910",
				"nsu": "12345"
			},
			"address": {
				"street": "Street name example",
				"number": "10",
				"additionalInformation": "Additional information example",
				"county": "County Example",
				"city": "City Example",
				"state": "SP",
				"zipcode": "12345678",
				"country": "Brasil",
				"reference": "Address reference example"
			}
		}
	],
	"items": [{
			"code": "Item Code",
			"name": "Item description",
			"barCode": "1234567891012",
			"value": 10.00,
			"amount": 1,
			"categoryID": 1,
			"categoryName": "Item category name",
			"isGift": true,
			"sellerName": "Seller Name",
			"sellerDocument": "12345678910123",
			"isMarketPlace": "true",
			"sellerSegment": "Eletronicos",
			"shippingCompany": "Shipping Company Name"
		}
	],
	"passengers": [{
			"name": "Passanger name",
			"companyMileCard": "Company Name",
			"mileCard": "123456789",
			"identificationType": 1,
			"identificationNumber": "123456789",
			"gender": "M",
			"birthdate": "1990-01-10T00:00:00.000",
			"cpf": "12345678910"
		}
	],
	"connections": [{
			"company": "JJ",
			"identificationNumber": 12345,
			"date": "2017-10-10T00:00:00.000",
			"seatClass": "Seat Class",
			"origin": "GRU",
			"destination": "LHR",
			"boarding": "2017-10-10T00:00:00.000",
			"arriving": "2017-10-10T00:00:00.000",
			"fareClass": "First Class"
		}
	],
	"hotels": [{
			"name": "Hotel Name",
			"city": "Hotel City",
			"state": "Hotel State",
			"country": "Hotel Country",
			"reservationDate": "2017-10-10T00:00:00.000",
			"reserveExpirationDate": "2017-10-10T00:00:00.000",
			"checkInDate": "2017-10-10T00:00:00.000",
			"checkOutDate": "2017-10-10T00:00:00.000"
		}
	]
}
Resposta
Content-Type: application/json
Request-ID: 12J6-11B3-11A7-93C0
{
  "packageID": "4825dc1d-5246-45d3-ba32-d2de9bbff478",
  "orders": [
    {
      "code": "{CODIGO_DO_MEU_PEDIDO}",
      "status": "NVO",
      "score": null
    }
  ]
}

Sending orders

Request
POST https://api.clearsale.com.br/v1/orders/
Content-Type: application/json
Authorization: Bearer {TOKEN}
{
	"code": "ORDER_EXAMPLE_2_0_1",
	"sessionID": "SessionIDValue",
	"date": "2017-03-22T13:38:59.9894222",
	"email": "email@email.com.br",
	"b2bB2c": "B2C",
	"itemValue": 10.00,
	"totalValue": 15.00,
	"numberOfInstallments": 1,
	"ip": "192.168.0.1",
	"isGift": false,
	"giftMessage": "Message Example",
	"observation": "Observation example",
	"status": 0,
	"origin": "Origin example",
	"channelID": "Additional origin information",
	"reservationDate": "2017-03-21T22:36:36.0000000",
	"country": "Brasil",
	"nationality": "Brasileiro",
	"product": 1,
	"customSla": 60,
	"bankAuthentication": "Aprovado 3DS",
	"subAcquirer": "Sub Acquirer Name",
	"list": {
		"typeID": 3,
		"id": "List Code Example"
	},
	"purchaseInformation": {
		"lastDateInsertedMail": "2015-03-01T02:40:00",
		"lastDateChangePassword": "2015-04-02T05:15:00",
		"lastDateChangePhone": "2015-05-03T10:45:00",
		"lastDateChangeMobilePhone": "2015-06-04T12:05:00",
		"lastDateInsertedAddress": "2015-07-05T15:25:00",
		"purchaseLogged": false,
		"email": "email@pemail.com.br",
		"login": "SocialNetworkLogin"
	},
	"socialNetwork": {
		"optInCompreConfie": 1,
		"typeSocialNetwork": 2,
		"authenticationToken": "123456abcd"
	},
	"billing": {
		"clientID": "Client123",
		"type": 1,
		"primaryDocument": "12345678910",
		"secondaryDocument": "12345678",
		"name": "Complete Client Name",
		"birthDate": "1990-01-10T00:00:00.000",
		"email": "email@email.com.br",
		"gender": "M",
		"address": {
			"street": "Street name example",
			"number": "100",
			"additionalInformation": "Additional information example",
			"county": "County Example",
			"city": "City Example",
			"state": "SP",
			"zipcode": "12345678",
			"country": "Brasil",
			"reference": "Address reference example"
		},
		"phones": [{
				"type": 1,
				"ddi": 55,
				"ddd": 11,
				"number": 33333333,
				"extension": "1111"
			}
		]
	},
	"shipping": {
		"clientID": "Client123",
		"type": 1,
		"primaryDocument": "12345678910",
		"secondaryDocument": "12345678",
		"name": "Complete Client Name",
		"birthDate": "1990-01-10T00:00:00.000",
		"email": "email@email.com.br",
		"gender": "M",
		"address": {
			"street": "Street name example",
			"number": "100",
			"additionalInformation": "Additional information example",
			"county": "County Example",
			"city": "City Example",
			"state": "SP",
			"zipcode": "12345678",
			"country": "Brasil",
			"reference": "Address reference example"
		},
		"phones": [{
				"type": 1,
				"ddi": 55,
				"ddd": 11,
				"number": 33333333,
				"extension": "1111"
			}
		],
		"deliveryType": "1",
		"deliveryTime": "2 dias úteis",
		"price": 5.00,
		"pickUpStoreDocument": "12345678910"
	},
	"payments": [{
			"sequential": 1,
			"date": "2017-03-21T22:36:53.0000000",
			"value": 25.00,
			"type": 1,
			"installments": 1,
			"interestRate": 10,
			"interestValue": 2.00,
			"currency": 986,
			"voucherOrderOrigin": "123456",
			"card": {
				"number": "123456xxxxxx1234",
				"hash": "12345678945612301234569874563210",
				"bin": "123456",
				"end": "1234",
				"type": 1,
				"validityDate": "02/2021",
				"ownerName": "Owner Card Name",
				"document": "12345678910",
				"nsu": "12345"
			},
			"address": {
				"street": "Street name example",
				"number": "10",
				"additionalInformation": "Additional information example",
				"county": "County Example",
				"city": "City Example",
				"state": "SP",
				"zipcode": "12345678",
				"country": "Brasil",
				"reference": "Address reference example"
			}
		}
	],
	"items": [{
			"code": "Item Code",
			"name": "Item description",
			"barCode": "1234567891012",
			"value": 10.00,
			"amount": 1,
			"categoryID": 1,
			"categoryName": "Item category name",
			"isGift": true,
			"sellerName": "Seller Name",
			"sellerDocument": "12345678910123",
			"isMarketPlace": "true",
			"sellerSegment": "Eletronicos",
			"shippingCompany": "Shipping Company Name"
		}
	],
	"passengers": [{
			"name": "Passanger name",
			"companyMileCard": "Company Name",
			"mileCard": "123456789",
			"identificationType": 1,
			"identificationNumber": "123456789",
			"gender": "M",
			"birthdate": "1990-01-10T00:00:00.000",
			"cpf": "12345678910"
		}
	],
	"connections": [{
			"company": "JJ",
			"identificationNumber": 12345,
			"date": "2017-10-10T00:00:00.000",
			"seatClass": "Seat Class",
			"origin": "GRU",
			"destination": "LHR",
			"boarding": "2017-10-10T00:00:00.000",
			"arriving": "2017-10-10T00:00:00.000",
			"fareClass": "First Class"
		}
	],
	"hotels": [{
			"name": "Hotel Name",
			"city": "Hotel City",
			"state": "Hotel State",
			"country": "Hotel Country",
			"reservationDate": "2017-10-10T00:00:00.000",
			"reserveExpirationDate": "2017-10-10T00:00:00.000",
			"checkInDate": "2017-10-10T00:00:00.000",
			"checkOutDate": "2017-10-10T00:00:00.000"
		}
	]
}
POST https://homologacao.clearsale.com.br/api/v1/orders/
Content-Type: application/json
Authorization: Bearer {TOKEN}
{
	"code": "ORDER_EXAMPLE_2_0_1",
	"sessionID": "SessionIDValue",
	"date": "2017-03-22T13:38:59.9894222",
	"email": "email@email.com.br",
	"b2bB2c": "B2C",
	"itemValue": 10.00,
	"totalValue": 15.00,
	"numberOfInstallments": 1,
	"ip": "192.168.0.1",
	"isGift": false,
	"giftMessage": "Message Example",
	"observation": "Observation example",
	"status": 0,
	"origin": "Origin example",
	"channelID": "Additional origin information",
	"reservationDate": "2017-03-21T22:36:36.0000000",
	"country": "Brasil",
	"nationality": "Brasileiro",
	"product": 1,
	"customSla": 60,
	"bankAuthentication": "Aprovado 3DS",
	"list": {
		"typeID": 3,
		"id": "List Code Example"
	},
	"purchaseInformation": {
		"lastDateInsertedMail": "2015-03-01T02:40:00",
		"lastDateChangePassword": "2015-04-02T05:15:00",
		"lastDateChangePhone": "2015-05-03T10:45:00",
		"lastDateChangeMobilePhone": "2015-06-04T12:05:00",
		"lastDateInsertedAddress": "2015-07-05T15:25:00",
		"purchaseLogged": false,
		"email": "email@pemail.com.br",
		"login": "SocialNetworkLogin"
	},
	"socialNetwork": {
		"optInCompreConfie": 1,
		"typeSocialNetwork": 2,
		"authenticationToken": "123456abcd"
	},
	"billing": {
		"clientID": "Client123",
		"type": 1,
		"primaryDocument": "12345678910",
		"secondaryDocument": "12345678",
		"name": "Complete Client Name",
		"birthDate": "1990-01-10T00:00:00.000",
		"email": "email@email.com.br",
		"gender": "M",
		"address": {
			"street": "Street name example",
			"number": "100",
			"additionalInformation": "Additional information example",
			"county": "County Example",
			"city": "City Example",
			"state": "SP",
			"zipcode": "12345678",
			"country": "Brasil",
			"reference": "Address reference example"
		},
		"phones": [{
			"type": 1,
			"ddi": 55,
			"ddd": 11,
			"number": 33333333,
			"extension": "1111"
		}]
	},
	"shipping": {
		"clientID": "Client123",
		"type": 1,
		"primaryDocument": "12345678910",
		"secondaryDocument": "12345678",
		"name": "Complete Client Name",
		"birthDate": "1990-01-10T00:00:00.000",
		"email": "email@email.com.br",
		"gender": "M",
		"address": {
			"street": "Street name example",
			"number": "100",
			"additionalInformation": "Additional information example",
			"county": "County Example",
			"city": "City Example",
			"state": "SP",
			"zipcode": "12345678",
			"country": "Brasil",
			"reference": "Address reference example"
		},
		"phones": [{
			"type": 1,
			"ddi": 55,
			"ddd": 11,
			"number": 33333333,
			"extension": "1111"
		}],
		"deliveryType": "1",
		"deliveryTime": "2 dias úteis",
		"price": 5.00,
		"pickUpStoreDocument": "12345678910"
	},
	"payments": [{
		"sequential": 1,
		"date": "2017-03-21T22:36:53.0000000",
		"value": 25.00,
		"type": 1,
		"installments": 1,
		"interestRate": 10,
		"interestValue": 2.00,
		"currency": 986,
		"voucherOrderOrigin": "123456",
		"card": {
			"number": "123456xxxxxx1234",
			"hash": "12345678945612301234569874563210",
			"bin": "123456",
			"end": "1234",
			"type": 1,
			"validityDate": "02/2021",
			"ownerName": "Owner Card Name",
			"document": "12345678910",
			"nsu": "12345"
		},
		"address": {
			"street": "Street name example",
			"number": "10",
			"additionalInformation": "Additional information example",
			"county": "County Example",
			"city": "City Example",
			"state": "SP",
			"zipcode": "12345678",
			"country": "Brasil",
			"reference": "Address reference example"
		}
	}],
	"items": [{
		"code": "Item Code",
		"name": "Item description",
		"value": 10.00,
		"amount": 1,
		"categoryID": 1,
		"categoryName": "Item category name",
		"isGift": true,
		"sellerName": "Seller Name",
		"isMarketPlace": "true",
		"shippingCompany": "Shipping Company Name"
	}],
	"passengers": [{
		"name": "Passanger name",
		"companyMileCard": "Company Name",
		"mileCard": "123456789",
		"identificationType": 1,
		"identificationNumber": "123456789",
		"gender": "M",
		"birthdate": "1990-01-10T00:00:00.000",
		"cpf": "12345678910"
	}],
	"connections": [{
		"company": "JJ",
		"identificationNumber": 12345,
		"date": "2017-10-10T00:00:00.000",
		"seatClass": "Seat Class",
		"origin": "GRU",
		"destination": "LHR",
		"boarding": "2017-10-10T00:00:00.000",
		"arriving": "2017-10-10T00:00:00.000",
		"fareClass": "First Class"
	}],
	"hotels": [{
		"name": "Hotel Name",
		"city": "Hotel City",
		"state": "Hotel State",
		"country": "Hotel Country",
		"reservationDate": "2017-10-10T00:00:00.000",
		"reserveExpirationDate": "2017-10-10T00:00:00.000",
		"checkInDate": "2017-10-10T00:00:00.000",
		"checkOutDate": "2017-10-10T00:00:00.000"
	}]
}
Response
Content-Type: application/json
Request-ID: 12J6-11B3-11A7-93C0
{
  "packageID": "4825dc1d-5246-45d3-ba32-d2de9bbff478",
  "orders": [
    {
      "code": "{ORDER_CODE}",
      "status": "NVO",
      "score": null
    }
  ]
}

Reanálise de Pedidos

Requisição
PUT https://api.clearsale.com.br/v1/orders/
Content-Type: application/json
Authorization: Bearer {TOKEN}
{
	"code": "ORDER_EXAMPLE_2_0_1",
	"sessionID": "SessionIDValue",
	"date": "2017-03-22T13:38:59.9894222",
	"email": "email@email.com.br",
	"b2bB2c": "B2C",
	"itemValue": 10.00,
	"totalValue": 15.00,
	"numberOfInstallments": 1,
	"ip": "192.168.0.1",
	"isGift": false,
	"giftMessage": "Message Example",
	"observation": "Observation example",
	"status": 0,
	"origin": "Origin example",
	"channelID": "Additional origin information",
	"reservationDate": "2017-03-21T22:36:36.0000000",
	"country": "Brasil",
	"nationality": "Brasileiro",
	"product": 1,
	"customSla": 60,
	"bankAuthentication": "Aprovado 3DS",
	"subAcquirer": "Sub Acquirer Name",
	"list": {
		"typeID": 3,
		"id": "List Code Example"
	},
	"purchaseInformation": {
		"lastDateInsertedMail": "2015-03-01T02:40:00",
		"lastDateChangePassword": "2015-04-02T05:15:00",
		"lastDateChangePhone": "2015-05-03T10:45:00",
		"lastDateChangeMobilePhone": "2015-06-04T12:05:00",
		"lastDateInsertedAddress": "2015-07-05T15:25:00",
		"purchaseLogged": false,
		"email": "email@pemail.com.br",
		"login": "SocialNetworkLogin"
	},
	"socialNetwork": {
		"optInCompreConfie": 1,
		"typeSocialNetwork": 2,
		"authenticationToken": "123456abcd"
	},
	"billing": {
		"clientID": "Client123",
		"type": 1,
		"primaryDocument": "12345678910",
		"secondaryDocument": "12345678",
		"name": "Complete Client Name",
		"birthDate": "1990-01-10T00:00:00.000",
		"email": "email@email.com.br",
		"gender": "M",
		"address": {
			"street": "Street name example",
			"number": "100",
			"additionalInformation": "Additional information example",
			"county": "County Example",
			"city": "City Example",
			"state": "SP",
			"zipcode": "12345678",
			"country": "Brasil",
			"reference": "Address reference example"
		},
		"phones": [{
				"type": 1,
				"ddi": 55,
				"ddd": 11,
				"number": 33333333,
				"extension": "1111"
			}
		]
	},
	"shipping": {
		"clientID": "Client123",
		"type": 1,
		"primaryDocument": "12345678910",
		"secondaryDocument": "12345678",
		"name": "Complete Client Name",
		"birthDate": "1990-01-10T00:00:00.000",
		"email": "email@email.com.br",
		"gender": "M",
		"address": {
			"street": "Street name example",
			"number": "100",
			"additionalInformation": "Additional information example",
			"county": "County Example",
			"city": "City Example",
			"state": "SP",
			"zipcode": "12345678",
			"country": "Brasil",
			"reference": "Address reference example"
		},
		"phones": [{
				"type": 1,
				"ddi": 55,
				"ddd": 11,
				"number": 33333333,
				"extension": "1111"
			}
		],
		"deliveryType": "1",
		"deliveryTime": "2 dias úteis",
		"price": 5.00,
		"pickUpStoreDocument": "12345678910"
	},
	"payments": [{
			"sequential": 1,
			"date": "2017-03-21T22:36:53.0000000",
			"value": 25.00,
			"type": 1,
			"installments": 1,
			"interestRate": 10,
			"interestValue": 2.00,
			"currency": 986,
			"voucherOrderOrigin": "123456",
			"card": {
				"number": "123456xxxxxx1234",
				"hash": "12345678945612301234569874563210",
				"bin": "123456",
				"end": "1234",
				"type": 1,
				"validityDate": "02/2021",
				"ownerName": "Owner Card Name",
				"document": "12345678910",
				"nsu": "12345"
			},
			"address": {
				"street": "Street name example",
				"number": "10",
				"additionalInformation": "Additional information example",
				"county": "County Example",
				"city": "City Example",
				"state": "SP",
				"zipcode": "12345678",
				"country": "Brasil",
				"reference": "Address reference example"
			}
		}
	],
	"items": [{
			"code": "Item Code",
			"name": "Item description",
			"barCode": "1234567891012",
			"value": 10.00,
			"amount": 1,
			"categoryID": 1,
			"categoryName": "Item category name",
			"isGift": true,
			"sellerName": "Seller Name",
			"sellerDocument": "12345678910123",
			"isMarketPlace": "true",
			"sellerSegment": "Eletronicos",
			"shippingCompany": "Shipping Company Name"
		}
	],
	"passengers": [{
			"name": "Passanger name",
			"companyMileCard": "Company Name",
			"mileCard": "123456789",
			"identificationType": 1,
			"identificationNumber": "123456789",
			"gender": "M",
			"birthdate": "1990-01-10T00:00:00.000",
			"cpf": "12345678910"
		}
	],
	"connections": [{
			"company": "JJ",
			"identificationNumber": 12345,
			"date": "2017-10-10T00:00:00.000",
			"seatClass": "Seat Class",
			"origin": "GRU",
			"destination": "LHR",
			"boarding": "2017-10-10T00:00:00.000",
			"arriving": "2017-10-10T00:00:00.000",
			"fareClass": "First Class"
		}
	],
	"hotels": [{
			"name": "Hotel Name",
			"city": "Hotel City",
			"state": "Hotel State",
			"country": "Hotel Country",
			"reservationDate": "2017-10-10T00:00:00.000",
			"reserveExpirationDate": "2017-10-10T00:00:00.000",
			"checkInDate": "2017-10-10T00:00:00.000",
			"checkOutDate": "2017-10-10T00:00:00.000"
		}
	]
}
PUT https://homologacao.clearsale.com.br/api/v1/orders/
Content-Type: application/json
Authorization: Bearer {TOKEN}
{
	"code": "ORDER_EXAMPLE_2_0_1",
	"sessionID": "SessionIDValue",
	"date": "2017-03-22T13:38:59.9894222",
	"email": "email@email.com.br",
	"b2bB2c": "B2C",
	"itemValue": 10.00,
	"totalValue": 15.00,
	"numberOfInstallments": 1,
	"ip": "192.168.0.1",
	"isGift": false,
	"giftMessage": "Message Example",
	"observation": "Observation example",
	"status": 0,
	"origin": "Origin example",
	"channelID": "Additional origin information",
	"reservationDate": "2017-03-21T22:36:36.0000000",
	"country": "Brasil",
	"nationality": "Brasileiro",
	"product": 1,
	"customSla": 60,
	"bankAuthentication": "Aprovado 3DS",
	"subAcquirer": "Sub Acquirer Name",
	"list": {
		"typeID": 3,
		"id": "List Code Example"
	},
	"purchaseInformation": {
		"lastDateInsertedMail": "2015-03-01T02:40:00",
		"lastDateChangePassword": "2015-04-02T05:15:00",
		"lastDateChangePhone": "2015-05-03T10:45:00",
		"lastDateChangeMobilePhone": "2015-06-04T12:05:00",
		"lastDateInsertedAddress": "2015-07-05T15:25:00",
		"purchaseLogged": false,
		"email": "email@pemail.com.br",
		"login": "SocialNetworkLogin"
	},
	"socialNetwork": {
		"optInCompreConfie": 1,
		"typeSocialNetwork": 2,
		"authenticationToken": "123456abcd"
	},
	"billing": {
		"clientID": "Client123",
		"type": 1,
		"primaryDocument": "12345678910",
		"secondaryDocument": "12345678",
		"name": "Complete Client Name",
		"birthDate": "1990-01-10T00:00:00.000",
		"email": "email@email.com.br",
		"gender": "M",
		"address": {
			"street": "Street name example",
			"number": "100",
			"additionalInformation": "Additional information example",
			"county": "County Example",
			"city": "City Example",
			"state": "SP",
			"zipcode": "12345678",
			"country": "Brasil",
			"reference": "Address reference example"
		},
		"phones": [{
				"type": 1,
				"ddi": 55,
				"ddd": 11,
				"number": 33333333,
				"extension": "1111"
			}
		]
	},
	"shipping": {
		"clientID": "Client123",
		"type": 1,
		"primaryDocument": "12345678910",
		"secondaryDocument": "12345678",
		"name": "Complete Client Name",
		"birthDate": "1990-01-10T00:00:00.000",
		"email": "email@email.com.br",
		"gender": "M",
		"address": {
			"street": "Street name example",
			"number": "100",
			"additionalInformation": "Additional information example",
			"county": "County Example",
			"city": "City Example",
			"state": "SP",
			"zipcode": "12345678",
			"country": "Brasil",
			"reference": "Address reference example"
		},
		"phones": [{
				"type": 1,
				"ddi": 55,
				"ddd": 11,
				"number": 33333333,
				"extension": "1111"
			}
		],
		"deliveryType": "1",
		"deliveryTime": "2 dias úteis",
		"price": 5.00,
		"pickUpStoreDocument": "12345678910"
	},
	"payments": [{
			"sequential": 1,
			"date": "2017-03-21T22:36:53.0000000",
			"value": 25.00,
			"type": 1,
			"installments": 1,
			"interestRate": 10,
			"interestValue": 2.00,
			"currency": 986,
			"voucherOrderOrigin": "123456",
			"card": {
				"number": "123456xxxxxx1234",
				"hash": "12345678945612301234569874563210",
				"bin": "123456",
				"end": "1234",
				"type": 1,
				"validityDate": "02/2021",
				"ownerName": "Owner Card Name",
				"document": "12345678910",
				"nsu": "12345"
			},
			"address": {
				"street": "Street name example",
				"number": "10",
				"additionalInformation": "Additional information example",
				"county": "County Example",
				"city": "City Example",
				"state": "SP",
				"zipcode": "12345678",
				"country": "Brasil",
				"reference": "Address reference example"
			}
		}
	],
	"items": [{
			"code": "Item Code",
			"name": "Item description",
			"barCode": "1234567891012",
			"value": 10.00,
			"amount": 1,
			"categoryID": 1,
			"categoryName": "Item category name",
			"isGift": true,
			"sellerName": "Seller Name",
			"sellerDocument": "12345678910123",
			"isMarketPlace": "true",
			"sellerSegment": "Eletronicos",
			"shippingCompany": "Shipping Company Name"
		}
	],
	"passengers": [{
			"name": "Passanger name",
			"companyMileCard": "Company Name",
			"mileCard": "123456789",
			"identificationType": 1,
			"identificationNumber": "123456789",
			"gender": "M",
			"birthdate": "1990-01-10T00:00:00.000",
			"cpf": "12345678910"
		}
	],
	"connections": [{
			"company": "JJ",
			"identificationNumber": 12345,
			"date": "2017-10-10T00:00:00.000",
			"seatClass": "Seat Class",
			"origin": "GRU",
			"destination": "LHR",
			"boarding": "2017-10-10T00:00:00.000",
			"arriving": "2017-10-10T00:00:00.000",
			"fareClass": "First Class"
		}
	],
	"hotels": [{
			"name": "Hotel Name",
			"city": "Hotel City",
			"state": "Hotel State",
			"country": "Hotel Country",
			"reservationDate": "2017-10-10T00:00:00.000",
			"reserveExpirationDate": "2017-10-10T00:00:00.000",
			"checkInDate": "2017-10-10T00:00:00.000",
			"checkOutDate": "2017-10-10T00:00:00.000"
		}
	]
}
Resposta
Content-Type: application/json
Request-ID: 12J6-11B3-11A7-93C0
{
  "packageID": "4825dc1d-5246-45d3-ba32-d2de9bbff478",
  "orders": [
    {
      "code": "{CODIGO_DO_MEU_PEDIDO}",
      "status": "NVO",
      "score": null
    }
  ]
}

Re-analysis of orders

Request
PUT https://api.clearsale.com.br/v1/orders/
Content-Type: application/json
Authorization: Bearer {TOKEN}
{
	"code": "ORDER_EXAMPLE_2_0_1",
	"sessionID": "SessionIDValue",
	"date": "2017-03-22T13:38:59.9894222",
	"email": "email@email.com.br",
	"b2bB2c": "B2C",
	"itemValue": 10.00,
	"totalValue": 15.00,
	"numberOfInstallments": 1,
	"ip": "192.168.0.1",
	"isGift": false,
	"giftMessage": "Message Example",
	"observation": "Observation example",
	"status": 0,
	"origin": "Origin example",
	"channelID": "Additional origin information",
	"reservationDate": "2017-03-21T22:36:36.0000000",
	"country": "Brasil",
	"nationality": "Brasileiro",
	"product": 1,
	"customSla": 60,
	"bankAuthentication": "Aprovado 3DS",
	"subAcquirer": "Sub Acquirer Name",
	"list": {
		"typeID": 3,
		"id": "List Code Example"
	},
	"purchaseInformation": {
		"lastDateInsertedMail": "2015-03-01T02:40:00",
		"lastDateChangePassword": "2015-04-02T05:15:00",
		"lastDateChangePhone": "2015-05-03T10:45:00",
		"lastDateChangeMobilePhone": "2015-06-04T12:05:00",
		"lastDateInsertedAddress": "2015-07-05T15:25:00",
		"purchaseLogged": false,
		"email": "email@pemail.com.br",
		"login": "SocialNetworkLogin"
	},
	"socialNetwork": {
		"optInCompreConfie": 1,
		"typeSocialNetwork": 2,
		"authenticationToken": "123456abcd"
	},
	"billing": {
		"clientID": "Client123",
		"type": 1,
		"primaryDocument": "12345678910",
		"secondaryDocument": "12345678",
		"name": "Complete Client Name",
		"birthDate": "1990-01-10T00:00:00.000",
		"email": "email@email.com.br",
		"gender": "M",
		"address": {
			"street": "Street name example",
			"number": "100",
			"additionalInformation": "Additional information example",
			"county": "County Example",
			"city": "City Example",
			"state": "SP",
			"zipcode": "12345678",
			"country": "Brasil",
			"reference": "Address reference example"
		},
		"phones": [{
				"type": 1,
				"ddi": 55,
				"ddd": 11,
				"number": 33333333,
				"extension": "1111"
			}
		]
	},
	"shipping": {
		"clientID": "Client123",
		"type": 1,
		"primaryDocument": "12345678910",
		"secondaryDocument": "12345678",
		"name": "Complete Client Name",
		"birthDate": "1990-01-10T00:00:00.000",
		"email": "email@email.com.br",
		"gender": "M",
		"address": {
			"street": "Street name example",
			"number": "100",
			"additionalInformation": "Additional information example",
			"county": "County Example",
			"city": "City Example",
			"state": "SP",
			"zipcode": "12345678",
			"country": "Brasil",
			"reference": "Address reference example"
		},
		"phones": [{
				"type": 1,
				"ddi": 55,
				"ddd": 11,
				"number": 33333333,
				"extension": "1111"
			}
		],
		"deliveryType": "1",
		"deliveryTime": "2 dias úteis",
		"price": 5.00,
		"pickUpStoreDocument": "12345678910"
	},
	"payments": [{
			"sequential": 1,
			"date": "2017-03-21T22:36:53.0000000",
			"value": 25.00,
			"type": 1,
			"installments": 1,
			"interestRate": 10,
			"interestValue": 2.00,
			"currency": 986,
			"voucherOrderOrigin": "123456",
			"card": {
				"number": "123456xxxxxx1234",
				"hash": "12345678945612301234569874563210",
				"bin": "123456",
				"end": "1234",
				"type": 1,
				"validityDate": "02/2021",
				"ownerName": "Owner Card Name",
				"document": "12345678910",
				"nsu": "12345"
			},
			"address": {
				"street": "Street name example",
				"number": "10",
				"additionalInformation": "Additional information example",
				"county": "County Example",
				"city": "City Example",
				"state": "SP",
				"zipcode": "12345678",
				"country": "Brasil",
				"reference": "Address reference example"
			}
		}
	],
	"items": [{
			"code": "Item Code",
			"name": "Item description",
			"barCode": "1234567891012",
			"value": 10.00,
			"amount": 1,
			"categoryID": 1,
			"categoryName": "Item category name",
			"isGift": true,
			"sellerName": "Seller Name",
			"sellerDocument": "12345678910123",
			"isMarketPlace": "true",
			"shippingCompany": "Shipping Company Name"
		}
	],
	"passengers": [{
			"name": "Passanger name",
			"companyMileCard": "Company Name",
			"mileCard": "123456789",
			"identificationType": 1,
			"identificationNumber": "123456789",
			"gender": "M",
			"birthdate": "1990-01-10T00:00:00.000",
			"cpf": "12345678910"
		}
	],
	"connections": [{
			"company": "JJ",
			"identificationNumber": 12345,
			"date": "2017-10-10T00:00:00.000",
			"seatClass": "Seat Class",
			"origin": "GRU",
			"destination": "LHR",
			"boarding": "2017-10-10T00:00:00.000",
			"arriving": "2017-10-10T00:00:00.000",
			"fareClass": "First Class"
		}
	],
	"hotels": [{
			"name": "Hotel Name",
			"city": "Hotel City",
			"state": "Hotel State",
			"country": "Hotel Country",
			"reservationDate": "2017-10-10T00:00:00.000",
			"reserveExpirationDate": "2017-10-10T00:00:00.000",
			"checkInDate": "2017-10-10T00:00:00.000",
			"checkOutDate": "2017-10-10T00:00:00.000"
		}
	]
}
PUT https://homologacao.clearsale.com.br/api/v1/orders/
Content-Type: application/json
Authorization: Bearer {TOKEN}
{
	"code": "ORDER_EXAMPLE_2_0_1",
	"sessionID": "SessionIDValue",
	"date": "2017-03-22T13:38:59.9894222",
	"email": "email@email.com.br",
	"b2bB2c": "B2C",
	"itemValue": 10.00,
	"totalValue": 15.00,
	"numberOfInstallments": 1,
	"ip": "192.168.0.1",
	"isGift": false,
	"giftMessage": "Message Example",
	"observation": "Observation example",
	"status": 0,
	"origin": "Origin example",
	"channelID": "Additional origin information",
	"reservationDate": "2017-03-21T22:36:36.0000000",
	"country": "Brasil",
	"nationality": "Brasileiro",
	"product": 1,
	"customSla": 60,
	"bankAuthentication": "Aprovado 3DS",
	"subAcquirer": "Sub Acquirer Name",
	"list": {
		"typeID": 3,
		"id": "List Code Example"
	},
	"purchaseInformation": {
		"lastDateInsertedMail": "2015-03-01T02:40:00",
		"lastDateChangePassword": "2015-04-02T05:15:00",
		"lastDateChangePhone": "2015-05-03T10:45:00",
		"lastDateChangeMobilePhone": "2015-06-04T12:05:00",
		"lastDateInsertedAddress": "2015-07-05T15:25:00",
		"purchaseLogged": false,
		"email": "email@pemail.com.br",
		"login": "SocialNetworkLogin"
	},
	"socialNetwork": {
		"optInCompreConfie": 1,
		"typeSocialNetwork": 2,
		"authenticationToken": "123456abcd"
	},
	"billing": {
		"clientID": "Client123",
		"type": 1,
		"primaryDocument": "12345678910",
		"secondaryDocument": "12345678",
		"name": "Complete Client Name",
		"birthDate": "1990-01-10T00:00:00.000",
		"email": "email@email.com.br",
		"gender": "M",
		"address": {
			"street": "Street name example",
			"number": "100",
			"additionalInformation": "Additional information example",
			"county": "County Example",
			"city": "City Example",
			"state": "SP",
			"zipcode": "12345678",
			"country": "Brasil",
			"reference": "Address reference example"
		},
		"phones": [{
				"type": 1,
				"ddi": 55,
				"ddd": 11,
				"number": 33333333,
				"extension": "1111"
			}
		]
	},
	"shipping": {
		"clientID": "Client123",
		"type": 1,
		"primaryDocument": "12345678910",
		"secondaryDocument": "12345678",
		"name": "Complete Client Name",
		"birthDate": "1990-01-10T00:00:00.000",
		"email": "email@email.com.br",
		"gender": "M",
		"address": {
			"street": "Street name example",
			"number": "100",
			"additionalInformation": "Additional information example",
			"county": "County Example",
			"city": "City Example",
			"state": "SP",
			"zipcode": "12345678",
			"country": "Brasil",
			"reference": "Address reference example"
		},
		"phones": [{
				"type": 1,
				"ddi": 55,
				"ddd": 11,
				"number": 33333333,
				"extension": "1111"
			}
		],
		"deliveryType": "1",
		"deliveryTime": "2 dias úteis",
		"price": 5.00,
		"pickUpStoreDocument": "12345678910"
	},
	"payments": [{
			"sequential": 1,
			"date": "2017-03-21T22:36:53.0000000",
			"value": 25.00,
			"type": 1,
			"installments": 1,
			"interestRate": 10,
			"interestValue": 2.00,
			"currency": 986,
			"voucherOrderOrigin": "123456",
			"card": {
				"number": "123456xxxxxx1234",
				"hash": "12345678945612301234569874563210",
				"bin": "123456",
				"end": "1234",
				"type": 1,
				"validityDate": "02/2021",
				"ownerName": "Owner Card Name",
				"document": "12345678910",
				"nsu": "12345"
			},
			"address": {
				"street": "Street name example",
				"number": "10",
				"additionalInformation": "Additional information example",
				"county": "County Example",
				"city": "City Example",
				"state": "SP",
				"zipcode": "12345678",
				"country": "Brasil",
				"reference": "Address reference example"
			}
		}
	],
	"items": [{
			"code": "Item Code",
			"name": "Item description",
			"barCode": "1234567891012",
			"value": 10.00,
			"amount": 1,
			"categoryID": 1,
			"categoryName": "Item category name",
			"isGift": true,
			"sellerName": "Seller Name",
			"sellerDocument": "12345678910123",
			"isMarketPlace": "true",
			"shippingCompany": "Shipping Company Name"
		}
	],
	"passengers": [{
			"name": "Passanger name",
			"companyMileCard": "Company Name",
			"mileCard": "123456789",
			"identificationType": 1,
			"identificationNumber": "123456789",
			"gender": "M",
			"birthdate": "1990-01-10T00:00:00.000",
			"cpf": "12345678910"
		}
	],
	"connections": [{
			"company": "JJ",
			"identificationNumber": 12345,
			"date": "2017-10-10T00:00:00.000",
			"seatClass": "Seat Class",
			"origin": "GRU",
			"destination": "LHR",
			"boarding": "2017-10-10T00:00:00.000",
			"arriving": "2017-10-10T00:00:00.000",
			"fareClass": "First Class"
		}
	],
	"hotels": [{
			"name": "Hotel Name",
			"city": "Hotel City",
			"state": "Hotel State",
			"country": "Hotel Country",
			"reservationDate": "2017-10-10T00:00:00.000",
			"reserveExpirationDate": "2017-10-10T00:00:00.000",
			"checkInDate": "2017-10-10T00:00:00.000",
			"checkOutDate": "2017-10-10T00:00:00.000"
		}
	]
}
Response
Content-Type: application/json
Request-ID: 12J6-11B3-11A7-93C0
{
  "packageID": "4825dc1d-5246-45d3-ba32-d2de9bbff478",
  "orders": [
    {
      "code": "{ORDER_CODE}",
      "status": "NVO",
      "score": null
    }
  ]
}

Notificação de alteração de status

Sempre que ocorrer alterações no status de um pedido, o Webhook da Clearsale irá enviar uma notificação para uma URL que deverá ser implementada no lado do integrador.

Requisição
POST {URL_DO_INTEGRADOR}
Content-Type: application/json
{
	"code": "{CODIGO_DO_MEU_PEDIDO}",
	"date": "2016-01-01T10:30:00.9931909-02:00",
	"type": "status"
}

Os dados da alteração não serão informados na notificação do Webhook, portanto, fica a cargo do integrador o consumo da consulta de status.

Importante: Se a URL do integrador retornar qualquer status http diferente de 200, o Webhook irá tentar notificar novamente para o pedido.

Assim que a URL for desenvolvida é necessário que envie o endereço a equipe de integração através do e-mail integracao@clear.sale para que essa URL seja configurada na base da Clearsale.

Update Status Notification

Webhook is the platform in charge of notifying customers about notifications that may occur within our system. Whenever an event happens, our API sends a HTTP request to the client URL, which contains information related to the event.

In order to keep this interaction safer, the notification will only notify that something has changed. However, it will not contain specific information about the event.

Setup: The Webhook relies on an URL, which must be developed by the Customer/Gateway and capable of translating the HTTP notification, which has the format showed below:

Request
POST {CLIENT_URL}
Content-Type: application/json
{
	"code": "{ORDER_CODE}",
	"date": "2016-01-01T10:30:00.9931909-02:00",
	"type": "status"
}

We strongly recommend, that the only answer returned from the HTTP request, must be a HTTP status 200 (Success). ClearSale will not store any other answer

Important: : If the Customer/Gateway URL do not answer the notification back, with the status 200, than the WebHook will keep trying to send the HTTP request, until it gets the answer.

Consulta de Status

Requisição
GET https://api.clearsale.com.br/v1/orders/{CODIGO_DO_MEU_PEDIDO}/status
Accept: application/json
Authorization: Bearer {TOKEN}
GET https://homologacao.clearsale.com.br/api/v1/orders/{CODIGO_DO_MEU_PEDIDO}/status
Accept: application/json
Authorization: Bearer {TOKEN}
Resposta
Content-Type: application/json
Request-ID: 12J6-11B3-11A7-93C0
{
  "code": "{CODIGO_DO_MEU_PEDIDO}",
  "status": "AMA",
  "score": 99.99
}

Status Check

Request
GET https://api.clearsale.com.br/v1/orders/{ORDER_CODE}/status
Accept: application/json
Authorization: Bearer {TOKEN}
GET https://homologacao.clearsale.com.br/api/v1/orders/{ORDER_CODE}/status
Accept: application/json
Authorization: Bearer {TOKEN}
Response
Content-Type: application/json
Request-ID: 12J6-11B3-11A7-93C0
{
  "code": "{ORDER_CODE}",
  "status": "AMA",
  "score": 99.99
}

Atualização de Status

Requisição
PUT https://api.clearsale.com.br/v1/orders/{CODIGO_DO_MEU_PEDIDO}/status
Content-Type: application/json
Authorization: Bearer {TOKEN}
{
	"status ": "Sigla do status"
}
PUT https://homologacao.clearsale.com.br/api/v1/orders/{CODIGO_DO_MEU_PEDIDO}/status
Content-Type: application/json
Authorization: Bearer {TOKEN}
{
	"status ": "Sigla do status"
}

Exemplo de status de pagamento

Resposta
Content-Type: application/json
Request-ID: 12J6-11B3-11A7-93C0
{
 	 "status": "OK",
 	 "message": "Status was changed with success"
}

Importante: Os status de atualização devem ser combinados com a equipe de integração.

Status Update

Request
PUT https://api.clearsale.com.br/v1/orders/{ORDER_CODE}/status
Content-Type: application/json
Authorization: Bearer {TOKEN}
{
	"status ": "status initials"
}
PUT https://homologacao.clearsale.com.br/api/v1/orders/{ORDER_CODE}/status
Content-Type: application/json
Authorization: Bearer {TOKEN}
{
	"status ": "status initials"
}

See the Statuses payments

Response
Content-Type: application/json
Request-ID: 12J6-11B3-11A7-93C0
{
 	 "status": "OK",
 	 "message": "Status was changed with success"
}

Note: The update statuses must be agreed upon with the integration team.

Marcação de Chargeback

Requisição
POST https://api.clearsale.com.br/v1/chargeback
Content-Type: application/json
Authorization: Bearer {TOKEN}
{
    "message" : "Mensagem de Exemplo",
	"orders" : ["{CODIGO_DO_MEU_PEDIDO}"]
}
POST https://homologacao.clearsale.com.br/api/v1/chargeback
Content-Type: application/json
Authorization: Bearer {TOKEN}
{
    "message" : "Mensagem de Exemplo",
	"orders" : ["{CODIGO_DO_MEU_PEDIDO}"]
}
Resposta
Content-Type: application/json
Request-ID: 12J6-11B3-11A7-93C0
{   
    "code": "{CODIGO_DO_MEU_PEDIDO}",
    "status": "Chargeback done"
}

Chargeback Authentication

Request
POST https://api.clearsale.com.br/v1/chargeback
Content-Type: application/json
Authorization: Bearer {TOKEN}
{
    "message" : "Message example",
	"orders" : ["{ORDER_CODE}"]
}
POST https://homologacao.clearsale.com.br/api/v1/chargeback
Content-Type: application/json
Authorization: Bearer {TOKEN}
{
    "message" : "Message example",
	"orders" : ["{ORDER_CODE}"]
}
Response
Content-Type: application/json
Request-ID: 12J6-11B3-11A7-93C0
{   
    "code": "{ORDER_CODE}",
    "status": "Chargeback done"
}

Resolução de problemas


Em todas as requisições realizadas será retornado uma chave no header chamada Request-ID, o valor desta chave conterá 19 caracteres, através de tal valor nosso suporte será capaz de capturar a sua transação e auxiliá-lo na resolução de algum problema.

Troubleshooting


All the requests will return a key in the header called Request-ID, the value of this key contains 19 characters. Our support will be able to find your transaction and assist you solving problems, by means of checking the Request-ID.


Tipo de telefone (billing/shipping.phone.type)


Código Descrição
0 Não definido
1 Residencial
2 Comercial
3 Recados
4 Cobrança
5 Temporário
6 Celular

Phone Type List (billing/shipping.phone.type)


ID Description
0 Undefined
1 Home
2 Work
3 Messages
4 Billing Phone
5 Temporary
6 Mobile

Código Descrição
1 CPF
2 CNPJ
3 RG
4 IE
5 Passaporte
6 CTPS
7 Título Eleitor
ID Description
1 CPF
2 CNPJ
3 RG
4 IE
5 Passport
6 CTPS
7 Voter ID Card

Tipo pessoa (billing/shipping.type)


Código Descrição
1 Pessoa Física
2 Pessoa Jurídica

Person Type (billing/shipping.type)


ID Description
1 Natural Person
2 Legal Person

Tipo de sexo (billing/shipping.gender)


Código Descrição
M Masculino
F Feminino

Gender Type (billing/shipping.gender)


ID Description
M Male
F Female

Tipo de pagamento (payment.type)


Código Descrição
1 Cartão de Crédito
2 Boleto Bancário
3 Débito Bancário
4 Débito Bancário - Dinheiro
5 Débito Bancário - Cheque
6 Transferência Bancária
7 Sedex a cobrar
8 Cheque
9 Dinheiro
10 Financiamento
11 Fatura
12 Cupom
13 Multicheque
14 Outros
16 Vale
27 PIX
1041 Cartão Presente Virtual
4011 Cartão de Débito / Transferência Eletrônica (CD)

Payment Type (payment.type)


ID Description
1 Credit Card
2 Bank Slip
3 Bank Debit
4 Bank Debit - Money
5 Bank Debit - Check
6 Bank Transfer
7 Sedex
8 Check
9 Money
10 Financing
11 Invoice
12 Coupon
13 Multicheque
14 Other
16 Voucher
1041 Virtual gift card
4011 Debit Card / Eletronic transfer

Bandeira Cartão de Crédito (card.type)


Código Descrição
1 Diners
2 MasterCard
3 Visa
4 Outros
5 American Express
6 HiperCard
7 Aura
10 Cartão Elo
50 LeaderCard
100 Fortbrasil
101 Sorocred
102 A Vista
103 Cartão Mais
105 Cartão C&A

Bank Card Flag List (card.type)


ID Description
1 Diners
2 MasterCard
3 Visa
4 Other
5 American Express
6 HiperCard
7 Aura
10 Elo Card
50 LeaderCard
100 Fortbrasil
101 Sorocred
102 Debit Card
103 Mais Card
105 C&A Card

Lista de Status (de retorno)


Status Descrição
APA (Aprovação Automática) – Pedido foi aprovado automaticamente segundo parâmetros definidos na regra de aprovação automática
APM (Aprovação Manual) – Pedido aprovado manualmente por tomada de decisão de um analista
RPM (Reprovado Sem Suspeita) – Pedido Reprovado sem Suspeita por falta de contato com o cliente dentro do período acordado e/ou políticas restritivas de CPF (Irregular, SUS ou Cancelados)
AMA (Análise manual) – Pedido está em fila para análise
NVO (Novo) – Pedido importado e não classificado Score pela analisadora (processo que roda o Score de cada pedido)
SUS (Suspensão Manual) – Pedido Suspenso por suspeita de fraude baseado no contato com o “cliente” ou ainda na base ClearSale
CAN (Cancelado pelo Cliente) – Cancelado por solicitação do cliente ou duplicidade do pedido
FRD (Fraude Confirmada) – Pedido imputado como Fraude Confirmada por contato com a administradora de cartão e/ou contato com titular do cartão ou CPF do cadastro que desconhecem a compra
RPA (Reprovação Automática) – Pedido Reprovado Automaticamente por algum tipo de Regra de Negócio que necessite aplicá-la
RPP (Reprovação Por Política) – Pedido reprovado automaticamente por política estabelecida pelo cliente ou Clearsale
APP (Aprovação Por Política) – Pedido aprovado automaticamente por política estabelecida pelo cliente ou Clearsale

Analysis Status List


ID Description
APA Automatic Approval - Order automatically approved based on predefined rule
APM Manual Approval - Order manually approved by an analyst’s decision-making
RPM Denied Without Suspicion - Order denied for lack of successful contact or restrictive policies
AMA Manual Analysis - Order waiting for manual analysis
NVO New - Order successfully received, but not classified yet
SUS Manual Suspension - Order suspended manually for fraud suspicion
CAN Cancelled by Customer - Cancelled by customer solicitation
FRD Confirmed Fraud - Order analyzed and based on the contact, the credit card company stated the fraud or the actual owner of the card is not aware of the purchase
RPA Denied Automatically - Order automatically denied based on predefined rule (Not recommended)
RPP Denied by Policies – Order denied due to policies defined by ClearSale or customer
APP Approved by Policies – Order approved due to policies defined by ClearSale or customer

Lista de Status (de entrada)

Atenção: Ao enviar o status no pedido é importante ressaltar que este pedido será incluso como histórico e não será analisado pela ClearSale.

Somente os pedidos que forem enviados com o status 0 – NVO ou que não tiverem o status definido que serão analisados pelo ClearSale.


Código Descrição
0 Novo (será analisado pelo ClearSale)
9 Aprovado (irá ao ClearSale já aprovado e não será analisado)
41 Cancelado pelo cliente (irá ao ClearSale já cancelado e não será analisado)
45 Reprovado (irá ao ClearSale já reprovado e não será analisado)

Initial Status List * (orders.status)

Important: Only orders with status 0 (NVO) or without status will be analyzed. ClearSale will save as history, all the orders that have a different status.


ID Description
0 New
9 Approved - This order will not be analyzed by Clearsale
41 Cancelled by the customer - This order will not be analyzed by Clearsale
45 Denied - The order will not be analyzed by Clearsale

Status de pagamento


Código Descrição
PGA Pagamento Aprovado
PGR Pagamento Reprovado

Statuses of Payments


ID Description
PGA Payment Approved
PGR Payment Denied

Tipo de Entrega (shipping.deliveryType)


Código Descrição
0 Outros
1 Normal
2 Garantida
3 ExpressaBR
4 ExpressaSP
5 Alta
6 Econômica
7 Agendada
8 Extra Rápida
9 Impresso
10 Aplicativo
11 Correio
12 Motoboy
13 Retirada Bilheteria
14 Retirada Loja Parceira
15 Cartão de Crédito Ingresso
16 Retirada Loja
17 Retirada via Lockers (Parceiros)
18 Retirada em Agencia dos Correios
19 Entrega Garantida no mesmo dia da compra
20 Entrega Garantida no dia seguinte da compra
21 Retirada em loja - Expresso

Importante: Em caso de envio de algum tipo de entrega como “Retirada”, é necessário também o envio dos dados de endereço do estabelecimento de retirada no objeto de entrega da compra (shipping.address).

Os dados de endereço de cobrança (billing.address) devem continuar sendo o do cliente.

Delivery Types (shipping.deliveryType)


ID Description
0 Others
1 Normal
2 Guaranteed
3 Express Brazil
4 Express São Paulo
5 High
6 Economic
7 Schedueld
8 Extra Fast
9 Via Print
10 Via App
11 Mail
12 Motocycle Courier
13 Withdrawl at Ticket box
14 Withdrawal at Partner Store
15 Ticket Credit Card
16 Withdrawl at Store
17 Withdrawl via Lockers (Partners)
18 Withdrawl at Mail Agency
19 Guaranteed delivery on the same day of purchase
20 Guaranteed delivery the day after the purchase
21 Withdrawl at Store - Express

Tipo de listas (order.list.typeID)


ID Descrição
1 Lista Não Cadastrada
2 Lista de Chá de Bebê
3 Lista de Casamento
4 Lista de Desejos
5 Lista de Aniversário
6 Chá Bar / Chá de Panela

List Types (order.list.typeID)


ID Description
1 Undefined
2 Baby Shower
3 Wedding List
4 Wish List
5 Bithday List
6 Bridal Shower

Rede Social (socialNetwork)


ID Descrição
1Facebook
2Twitter
3Linkedin
4Google
5Outros

Social Network


ID Description
1Facebook
2Twitter
3Linkedin
4Google
5Others

Lista de produto (order.product)


ID Descrição
-1 Outros
1 Application
3 Total
4 Total Garantido
9 Score
10 Realtime Decision
11 Tickets

Product List (order.product)


ID Description
-1 Other
1 Application
3 Total
4 Total Garantido
9 Score
10 Realtime Decision
11 Tickets

Lista de moeda (payment.currency)


Moeda Código Alfabético Código Numérico
ADB Unit of Account XUA 965
Afghani AFN 971
Algerian Dinar DZD 12
Argentine Peso ARS 32
Armenian Dram AMD 51
Aruban Florin AWG 533
Australian Dollar AUD 36
Azerbaijanian Manat AZN 944
Bahamian Dollar BSD 44
Bahraini Dinar BHD 48
Baht THB 764
Balboa PAB 590
Barbados Dollar BBD 52
Belarussian Ruble BYR 974
Belize Dollar BZD 84
Bermudian Dollar BMD 60
Bolivar Fuerte VEF 937
Boliviano BOB 68
Bond Markets Unit European Composite Unit (EURCO) XBA 955
Bond Markets Unit European Monetary Unit (E.M.U.-6) XBB 956
Bond Markets Unit European Unit of Account 17 (E.U.A.-17) XBD 958
Bond Markets Unit European Unit of Account 9 (E.U.A.-9) XBC 957
Brazilian Real BRL 986
Brunei Dollar BND 96
Bulgarian Lev BGN 975
Burundi Franc BIF 108
Canadian Dollar CAD 124
Cape Verde Escudo CVE 132
Cayman Islands Dollar KYD 136
CFA Franc BCEAO XOF 952
CFA Franc BEAC XAF 950
CFP Franc XPF 953
Chilean Peso CLP 152
Codes specifically reserved for testing purposes XTS 963
Colombian Peso COP 170
Comoro Franc KMF 174
Congolese Franc CDF 976
Convertible Mark BAM 977
Cordoba Oro NIO 558
Costa Rican Colon CRC 188
Croatian Kuna HRK 191
Cuban Peso CUP 192
Czech Koruna CZK 203
Dalasi GMD 270
Danish Krone DKK 208
Denar MKD 807
Djibouti Franc DJF 262
Dobra STD 678
Dominican Peso DOP 214
Dong VND 704
East Caribbean Dollar XCD 951
Egyptian Pound EGP 818
El Salvador Colon SVC 222
Ethiopian Birr ETB 230
Euro EUR 978
Falkland Islands Pound FKP 238
Fiji Dollar FJD 242
Forint HUF 348
Ghana Cedi GHS 936
Gibraltar Pound GIP 292
Gold XAU 959
Gourde HTG 332
Guarani PYG 600
Guinea Franc GNF 324
Guyana Dollar GYD 328
Hong Kong Dollar HKD 344
Hryvnia UAH 980
Iceland Krona ISK 352
Indian Rupee INR 356
Iranian Rial IRR 364
Iraqi Dinar IQD 368
Jamaican Dollar JMD 388
Jordanian Dinar JOD 400
Kenyan Shilling KES 404
Kina PGK 598
Kip LAK 418
Kuwaiti Dinar KWD 414
Kwacha MWK 454
Kwanza AOA 973
Kyat MMK 104
Lari GEL 981
Latvian Lats LVL 428
Lebanese Pound LBP 422
Lek ALL 8
Lempira HNL 340
Leone SLL 694
Liberian Dollar LRD 430
Libyan Dinar LYD 434
Lilangeni SZL 748
Lithuanian Litas LTL 440
Loti LSL 426
Malagasy Ariary MGA 969
Malaysian Ringgit MYR 458
Mauritius Rupee MUR 480
Mexican Peso MXN 484
Mexican Unidad de Inversion (UDI) MXV 979
Moldovan Leu MDL 498
Moroccan Dirham MAD 504
Mozambique Metical MZN 943
Mvdol BOV 984
Naira NGN 566
Nakfa ERN 232
Namibia Dollar NAD 516
Nepalese Rupee NPR 524
Netherlands Antillean Guilder ANG 532
New Israeli Sheqel ILS 376
New Romanian Leu RON 946
New Taiwan Dollar TWD 901
New Zealand Dollar NZD 554
Ngultrum BTN 64
North Korean Won KPW 408
Norwegian Krone NOK 578
Nuevo Sol PEN 604
Ouguiya MRO 478
Pa'anga TOP 776
Pakistan Rupee PKR 586
Palladium XPD 964
Pataca MOP 446
Peso Convertible CUC 931
Peso Uruguayo UYU 858
Philippine Peso PHP 608
Platinum XPT 962
Pound Sterling GBP 826
Pula BWP 72
Qatari Rial QAR 634
Quetzal GTQ 320
Rand ZAR 710
Rial Omani OMR 512
Riel KHR 116
Rufiyaa MVR 462
Rupiah IDR 360
Russian Ruble RUB 643
Rwanda Franc RWF 646
Saint Helena Pound SHP 654
Saudi Riyal SAR 682
SDR (Special Drawing Right) XDR 960
Serbian Dinar RSD 941
Seychelles Rupee SCR 690
Silver XAG 961
Singapore Dollar SGD 702
Solomon Islands Dollar SBD 90
Som KGS 417
Somali Shilling SOS 706
Somoni TJS 972
South Sudanese Pound SSP 728
Sri Lanka Rupee LKR 144
Sucre XSU 994
Sudanese Pound SDG 938
Surinam Dollar SRD 968
Swedish Krona SEK 752
Swiss Franc CHF 756
Syrian Pound SYP 760
Taka BDT 50
Tala WST 882
Tanzanian Shilling TZS 834
Tenge KZT 398
Trinidad and Tobago Dollar TTD 780
Tugrik MNT 496
Tunisian Dinar TND 788
Turkish Lira TRY 949
Turkmenistan New Manat TMT 934
UAE Dirham AED 784
Uganda Shilling UGX 800
UIC-Franc XFU Nil
Unidad de Valor Real COU 970
Unidades de fomento CLF 990
Uruguay Peso en Unidades Indexadas (URUIURUI) UYI 940
US Dollar USD 840
US Dollar (Next day) USN 997
US Dollar (Same day) USS 998
Uzbekistan Sum UZS 860
Vatu VUV 548
WIR Euro CHE 947
WIR Franc CHW 948
Won KRW 410
Yemeni Rial YER 886
Yen JPY 392
Yuan Renminbi CNY 156
Zambian Kwacha ZMK 894
Zimbabwe Dollar ZWL 932
Zloty PLN 985

Currency list (payment.currency)


Currency Alphabetic Code Numeric Code
ADB Unit of Account XUA 965
Afghani AFN 971
Algerian Dinar DZD 12
Argentine Peso ARS 32
Armenian Dram AMD 51
Aruban Florin AWG 533
Australian Dollar AUD 36
Azerbaijanian Manat AZN 944
Bahamian Dollar BSD 44
Bahraini Dinar BHD 48
Baht THB 764
Balboa PAB 590
Barbados Dollar BBD 52
Belarussian Ruble BYR 974
Belize Dollar BZD 84
Bermudian Dollar BMD 60
Bolivar Fuerte VEF 937
Boliviano BOB 68
Bond Markets Unit European Composite Unit (EURCO) XBA 955
Bond Markets Unit European Monetary Unit (E.M.U.-6) XBB 956
Bond Markets Unit European Unit of Account 17 (E.U.A.-17) XBD 958
Bond Markets Unit European Unit of Account 9 (E.U.A.-9) XBC 957
Brazilian Real BRL 986
Brunei Dollar BND 96
Bulgarian Lev BGN 975
Burundi Franc BIF 108
Canadian Dollar CAD 124
Cape Verde Escudo CVE 132
Cayman Islands Dollar KYD 136
CFA Franc BCEAO XOF 952
CFA Franc BEAC XAF 950
CFP Franc XPF 953
Chilean Peso CLP 152
Codes specifically reserved for testing purposes XTS 963
Colombian Peso COP 170
Comoro Franc KMF 174
Congolese Franc CDF 976
Convertible Mark BAM 977
Cordoba Oro NIO 558
Costa Rican Colon CRC 188
Croatian Kuna HRK 191
Cuban Peso CUP 192
Czech Koruna CZK 203
Dalasi GMD 270
Danish Krone DKK 208
Denar MKD 807
Djibouti Franc DJF 262
Dobra STD 678
Dominican Peso DOP 214
Dong VND 704
East Caribbean Dollar XCD 951
Egyptian Pound EGP 818
El Salvador Colon SVC 222
Ethiopian Birr ETB 230
Euro EUR 978
Falkland Islands Pound FKP 238
Fiji Dollar FJD 242
Forint HUF 348
Ghana Cedi GHS 936
Gibraltar Pound GIP 292
Gold XAU 959
Gourde HTG 332
Guarani PYG 600
Guinea Franc GNF 324
Guyana Dollar GYD 328
Hong Kong Dollar HKD 344
Hryvnia UAH 980
Iceland Krona ISK 352
Indian Rupee INR 356
Iranian Rial IRR 364
Iraqi Dinar IQD 368
Jamaican Dollar JMD 388
Jordanian Dinar JOD 400
Kenyan Shilling KES 404
Kina PGK 598
Kip LAK 418
Kuwaiti Dinar KWD 414
Kwacha MWK 454
Kwanza AOA 973
Kyat MMK 104
Lari GEL 981
Latvian Lats LVL 428
Lebanese Pound LBP 422
Lek ALL 8
Lempira HNL 340
Leone SLL 694
Liberian Dollar LRD 430
Libyan Dinar LYD 434
Lilangeni SZL 748
Lithuanian Litas LTL 440
Loti LSL 426
Malagasy Ariary MGA 969
Malaysian Ringgit MYR 458
Mauritius Rupee MUR 480
Mexican Peso MXN 484
Mexican Unidad de Inversion (UDI) MXV 979
Moldovan Leu MDL 498
Moroccan Dirham MAD 504
Mozambique Metical MZN 943
Mvdol BOV 984
Naira NGN 566
Nakfa ERN 232
Namibia Dollar NAD 516
Nepalese Rupee NPR 524
Netherlands Antillean Guilder ANG 532
New Israeli Sheqel ILS 376
New Romanian Leu RON 946
New Taiwan Dollar TWD 901
New Zealand Dollar NZD 554
Ngultrum BTN 64
North Korean Won KPW 408
Norwegian Krone NOK 578
Nuevo Sol PEN 604
Ouguiya MRO 478
Pa'anga TOP 776
Pakistan Rupee PKR 586
Palladium XPD 964
Pataca MOP 446
Peso Convertible CUC 931
Peso Uruguayo UYU 858
Philippine Peso PHP 608
Platinum XPT 962
Pound Sterling GBP 826
Pula BWP 72
Qatari Rial QAR 634
Quetzal GTQ 320
Rand ZAR 710
Rial Omani OMR 512
Riel KHR 116
Rufiyaa MVR 462
Rupiah IDR 360
Russian Ruble RUB 643
Rwanda Franc RWF 646
Saint Helena Pound SHP 654
Saudi Riyal SAR 682
SDR (Special Drawing Right) XDR 960
Serbian Dinar RSD 941
Seychelles Rupee SCR 690
Silver XAG 961
Singapore Dollar SGD 702
Solomon Islands Dollar SBD 90
Som KGS 417
Somali Shilling SOS 706
Somoni TJS 972
South Sudanese Pound SSP 728
Sri Lanka Rupee LKR 144
Sucre XSU 994
Sudanese Pound SDG 938
Surinam Dollar SRD 968
Swedish Krona SEK 752
Swiss Franc CHF 756
Syrian Pound SYP 760
Taka BDT 50
Tala WST 882
Tanzanian Shilling TZS 834
Tenge KZT 398
Trinidad and Tobago Dollar TTD 780
Tugrik MNT 496
Tunisian Dinar TND 788
Turkish Lira TRY 949
Turkmenistan New Manat TMT 934
UAE Dirham AED 784
Uganda Shilling UGX 800
UIC-Franc XFU Nil
Unidad de Valor Real COU 970
Unidades de fomento CLF 990
Uruguay Peso en Unidades Indexadas (URUIURUI) UYI 940
US Dollar USD 840
US Dollar (Next day) USN 997
US Dollar (Same day) USS 998
Uzbekistan Sum UZS 860
Vatu VUV 548
WIR Euro CHE 947
WIR Franc CHW 948
Won KRW 410
Yemeni Rial YER 886
Yen JPY 392
Yuan Renminbi CNY 156
Zambian Kwacha ZMK 894
Zimbabwe Dollar ZWL 932
Zloty PLN 985

Objeto order


Propriedade Descrição Tipo Tamanho Obrigatório
code Código do pedido String 50 S
sessionID Identificador único da sessão do usuário String 128 S
date Data do pedido Datetime S
email Email do pedido String 150 S
b2bB2c Tipo do ecommerce String 3 N
itemValue Valor Total dos Itens Decimal 20,4 N
totalValue Valor Total do Pedido. Composto pelo Valor Total dos Itens + Valor do Frete + Eventual Valor de Juros da Compra Decimal 20,4 S
numberOfInstallments Quantidade de Parcelas Integer N
ip IP do Pedido String 50 N
isGift Identifica se o pedido é presente Boolean N
giftMessage Mensagem de Presente String 8000 N
observation Observação do Pedido String 8000 N
status Status do Pedido Integer N
origin Canal de Origem do Pedido (ex: TELEVENDAS, WEBSITE, APP, etc.) String 150 N
channelID Canal de Origem complementar, se houver. (ex: ANDROID, IOS, etc.) String 150 N
reservationDate Data do Primeiro Voo do Pedido (em caso de aéreas) Datetime N
country Nome do País String 50 N
nationality Nome da Nacionalidade String 50 N
product ID do produto Integer N
customSla Valor em Minutos de SLA máximo de Análise do Pedido, se houver Integer N
bankAuthentication Tipo de autenticação do banco String 100 N
subAcquirer Nome do sub adquirente String 200 N
list tipo de lista list N
purchaseInformation Dados de cobrança purchaseInformation N
socialNetwork socialNetwork socialNetwork N
billing Dados de cobrança billing S
shipping Dados de entrega shipping N
payments Dados de pagamento Array<payment> S
items items Array<item> S
passengers passengers Array<passenger> N
connections connections Array<connection> N
hotels hotels Array<hotel> N

Importante: O envio do campo “customSLA” está condicionado a necessidade da loja de obter o resultado da análise de determinados pedidos em um tempo menor que o SLA padrão acordado com a equipe Comercial em contrato.

O tempo de SLA diferenciado também deve ser acordado com o Comercial, e será respeitado apenas após prévia configuração interna e homologação do envio do dado.

Object Order


Property Description Type Size Mandatory
code Order identification String 50 Y
sessionID The user session id of the website String 128 Y
date Order date Datetime Y
email Order email String 150 Y
b2bB2c Ecommerce type String 3 N
itemValue Total value of the order Decimal 20,4 N
totalValue Total value of the order. Decimal 20,4 Y
numberOfInstallments Quantity of installments Integer N
ip IP of the user who did the order String 50 N
isGift Identifies if the order is a gift Boolean N
giftMessage Message of the gift String 8000 N
observation Order note String 8000 N
status Initial order status See the list at Initial Status List Integer N
origin Order origin String 150 N
channelID Additional order origin info String 150 N
reservationDate Flight reservation date Datetime N
country Country String 50 N
nationality Nationality name String 50 N
product Product ID Integer N
customSla Deadline for customized analysis Integer N
bankAuthentication Bank authentication type String 100 N
subAcquirer Name of sub acquirer String 200 N
list List type list N
purchaseInformation Object purchaseInformation purchaseInformation N
socialNetwork Object socialNetwork socialNetwork N
billing Object billing billing Y
shipping Object shipping shipping N
payments Object payments Array<payment> Y
items Object items Array<item> Y
passengers Object passengers Array<passenger> N
connections Object connections Array<connection> N
hotels Object hotels Array<hotel> N

Objeto list


Propriedade Descrição Tipo Tamanho Obrigatório
typeID ID do tipo de lista Integer S
id ID da lista na loja String 200 S

Object list


Property Description Type Size Mandatory
typeID ID of the list type See the list at List Type List Integer Y
id ID of the list on the store String 200 Y

purchaseInformation


Propriedade Descrição Tipo Tamanho Obrigatório
lastDateInsertedMail Data da última alteração do e-mail Datetime N
lastDateChangePassword Data da última alteração da senha Datetime N
lastDateChangePhone Data da última alteração do telefone Datetime N
lastDateChangeMobilePhone Data da última alteração do telefone móvel Datetime N
lastDateInsertedAddress Data da última alteração do endereço Datetime N
purchaseLogged Compra logado boolean N
email E-mail de Cadastro String 200 N
login Login de Acesso String 200 N

Object purchaseInformation


Property Description Type Size Mandatory
lastDateInsertedMail Last email change date Datetime N
lastDateChangePassword Last password change date Datetime N
lastDateChangePhone Last phone change date Datetime N
lastDateChangeMobilePhone Last mobile phone change date Datetime N
lastDateInsertedAddress Last address change date Datetime N
purchaseLogged Logged purchase (true or false) boolean N
email Social network email String 200 N
login Social network login String 200 N

Objeto socialNetwork


Propriedade Descrição Tipo Tamanho Obrigatório
optInCompreConfie Cliente aceita ingressar no movimento Compre e Confie Integer N
typeSocialNetwork ID da rede social Integer N
authenticationToken Token retornado pela Rede Social String 500 N

Object socialNetwork


Property Description Type Size Mandatory
optInCompreConfie Customer agrees to join the CompreConfie movement (1 or 0) Integer N
typeSocialNetwork Social network ID See the list at Social Network List Integer N
authenticationToken Token of the social network String 500 N

Objeto billing


Propriedade Descrição Tipo Tamanho Obrigatório
clientID Código do cliente String 50 N
type Pessoa Física ou Jurídica Integer S
primaryDocument CPF ou CNPJ String 100 S
secondaryDocument RG ou Inscrição Estadual String 100 N
name Nome do cliente String 500 S
birthDate Data de Nascimento Datetime N
email Email String 150 N
gender Sexo String 1 N
address Endereço address N
phones Telefones Array<phone> S

Object billing


Property Description Type Size Mandatory
clientID Customer ID String 50 N
type Natual or Legal Person See the list at Person Type List Integer Y
primaryDocument CPF or CNPJ String 100 Y
secondaryDocument RG or state registration String 100 N
name Customer name String 500 Y
birthDate Customer birth date Datetime N
email Email String 150 N
gender Gender See the list at Gender List String 1 N
address Object address address N
phones Object Phones Array<phone> Y

Objeto shipping


Propriedade Descrição Tipo Tamanho Obrigatório
clientID Código do cliente String 50 N
type Pessoa Física ou Jurídica Integer S
primaryDocument CPF ou CNPJ String 100 S
secondaryDocument RG ou Inscrição Estadual String 100 N
name Nome do cliente String 500 S
birthDate Data de Nascimento Datetime N
email Email String 150 N
gender Sexo String 1 N
address Endereço address N
phones Telefones Array<phone> S
deliveryType ID do Tipo de entrega String 50 N
deliveryTime Prazo de Entrega String 50 N
price Valor do Frete Decimal 20,4 N
pickUpStoreDocument CPF para retirada em loja (caso o pedido seja de algum tipo de entrega “Retirada”) String 30 N

Object shipping


Property Description Type Size Mandatory
clientID Customer ID String 50 N
type Natural or Legal PersonSee the list at Person Type List Integer Y
primaryDocument CPF or CNPJ String 100 Y
secondaryDocument RG or state registration String 100 N
name Customer name String 500 Y
birthDate Customer birth date Datetime N
email Email String 150 N
gender Gender See the list at Gender List String 1 N
address Object Address address N
phones Object phones Array<phone> Y
deliveryType ID of the Shipping Type See the list ate Delivery types list String 50 N
deliveryTime Delivery Time String 50 N
price Shipping Price Decimal 20,4 N
pickUpStoreDocument CPF of the person who will withdraw the product in the store String 30 N

Objeto payments


Propriedade Descrição Tipo Tamanho Obrigatório
sequential Sequência de realização do pagamento Integer N
date Data do pagamento Datetime N
value Valor cobrado neste pagamento Decimal 20,4 N
type Tipo de Pagamento Integer S
installments Quantidade de Parcelas Integer N
interestRate Taxa de Juros Decimal 4,2 N
interestValue Valor dos Juros Decimal 20,4 N
currency Código da moeda Integer N
voucherOrderOrigin ID do pedido que gerou vale troca (caso a forma de pagamento atual seja “Vale”) String 50 N
address Endereço pagamento paymentAddress N
card cartão card S

Object payments


Property Description Type Size Mandatory
sequential Number indicating the payment sequence Integer N
date Payment date Datetime N
value Payment value Decimal 20,4 N
type Payment type See the list at Payment Type List Integer Y
installments Amount of installments Integer N
interestRate Interest rate Decimal 4,2 N
interestValue Interest value Decimal 20,4 N
currency Currency ID See the list at Currency List Integer N
voucherOrderOrigin Order ID that generated the voucher String 50 N
address Object paymentAddress paymentAddress N
card Object card card Y

Objeto items


Propriedade Descrição Tipo Tamanho Obrigatório
code Código do Produto String 50 N
name Nome do Produto String 150 S
barCode EAN (Código de barras) do produto String 200 N
value Valor Unitário Decimal 20,4 N
amount Quantidade Integer N
categoryID Código da Categoria do Produto Integer N
categoryName Nome da Categoria do Produto String 200 N
isGift Identifica se o item é um presente (true ou false) Boolean - N
sellerName Nome fantasia do seller/parceiro String 200 N
sellerDocument CNPJ do seller/parceiro String 14 N
isMarketPlace Para informar que há dados de seller, o valor deverá ser semprer ”true”. String 5 N
sellerSegment Segmento do seller/parceiro. String 200 N
shippingCompany Nome da Transportadora String 200 N

Importante: Em caso de empresas de passagens aéreas os dados de item não são obrigatórios.

Object items


Property Description Type Tamanho Mandatory
code Item code String 50 N
name Product name String 150 Y
barCode EAN (bar code) of product String 200 N
value Item unitary value Decimal 20,4 N
amount Amount of items Integer N
categoryID Category ID Integer N
categoryName Category Name String 200 N
isGift Identifies whether the product is a gift (true or false) Boolean - N
sellerName Seller name String 200 N
sellerDocument Seller's CNPJ String 14 N
isMarketPlace Item sold by Marketplace (inform "true" or "false") String 5 N
shippingCompany Shipping company name String 200 N

Note: In case of airline companies, item data is not required.

Objeto passengers


Propriedade Descrição Tipo Tamanho Obrigatório
name Nome do Passageiro String 100 S
companyMileCard Companhia de Milhagem (Fidelidade) String 50 N
mileCard Cartão de Milhagem (Fidelidade) String 50 N
identificationType Tipo de Documento de Identificação Integer N
identificationNumber Número do Documento String 50 N
gender Sexo do Passageiro String 1 N
birthdate Data de nascimento Datetime N
cpf CPF do Passageiro String 50 N

Object passengers


Property Description Type Size Mandatory
name Passanger name String 100 Y
companyMileCard Company mile card name String 50 N
mileCard Number of mile card String 50 N
identificationType Legal document type See the list at identification List Integer N
identificationNumber Legal document number String 50 N
gender Passager gender String 1 N
birthdate Passenger birth date Datetime N
cpf Passenger CPF String 50 N

Objeto connections


Propriedade Descrição Tipo Tamanho Obrigatório
company Nome da Companhia Aérea String 50 N
identificationNumber Número do Voo Decimal 6,0 N
date Data do Voo Datetime S
seatClass Classe do Assento String 10 N
origin Origem String 5 S
destination Destino String 5 S
boarding Data de Embarque Datetime S
arriving Data de Desembarque Datetime S
fareClass Classe Tarifária String 25 N

Importante: Os objetos passengers e connections são utilizados somente em empresas de passagens aéreas.

Caso não seja o seu caso, favor omitir essas propriedades no json de sua requisição.


No objeto connections informar somente os dados de origem e destino, não informar escalas e conexões.


Por exemplo:


Para um vôo de São Paulo (Guarulhos) para Londres, via New York (JFK), você irá informar apenas GRU-LHR, ao invés de GRU-JFK e JFK-LHR.

Object connections


Property Description Type Size Mandatory
company Name of the tourism company String 50 N
identificationNumber Travel number Decimal 6,0 N
date Travel date Datetime Y
seatClass Seat class String 10 N
origin Travel origin String 5 Y
destination Travel destination String 5 Y
boarding Departure date Datetime N
arriving Arrival date Datetime N
fareClass Fare Class String 25 N

Important: You should use passengers and connections objects only for tourism companies.

If that is not your case, please omit these objects on the Json requisition.


On the object connections, please, inform us only origin and destination data.Do not send us scales and connections.


Example


For a flight from São Paulo (GRU) to London (LHR) via New York (JFK), yout will send us only GRU-LHR, instead of GRU-JFK and JFK-LHR.

Objeto hotels


Propriedade Descrição Tipo Tamanho Obrigatório
name Nome do Hotel String 200 N
city Cidade String 150 N
state Estado String 150 N
country País String 150 N
reservationDate Data da Reserva Datetime N
reserveExpirationDate Data da Expiração da Reserva Datetime N
checkInDate Data da Chegada Datetime N
checkOutDate Data da Saída Datetime N

Object hotel


Property Description Type Size Mandatory
name Hotel name String 200 N
city city String 150 N
state state String 150 N
country Country String 150 N
reservationDate Reservation date Datetime N
reserveExpirationDate Reservation expiration date Datetime N
checkInDate Checkin Date Datetime N
checkOutDate Checkout Date Datetime N

Objeto address


Propriedade Descrição Tipo Tamanho Obrigatório
street Nome do logradouro String 200 S
number Número do Endereço String 15 S
additionalInformation Complemento do Endereço String 250 N
county Bairro do Endereço String 150 S
city Cidade do Endereço String 150 S
state Sigla do Estado do Endereço - UF String 2 S
country País do Endereço String 150 N
zipcode CEP do Endereço String 10 S
reference Referência do Endereço String 250 N

Importante: O envio do endereço não é obrigatório, porém caso tenha essa informação para envio, deverá respeitar a obrigatoriedade mínima dos campos informados como ‘S’.

Em caso de empresas de passagens aéreas o endereço de entrega não é obrigatório.

Se em sua regra de negócio existir a entrega física de produtos, os dados de entrega (shipping), incluindo os dados do endereço (shipping.address), deverão ser informados.

Object address


Property Description Type Size Mandatory
street Street name String 200 Y
number Address number String 15 Y
additionalInformation Address Complement String 250 N
county Address district String 150 Y
city Address city String 150 Y
state Address state initials String 2 Y
country Address country String 150 N
zipcode Address zip code String 10 Y
reference Address reference String 250 N

Important: It is not mandatory to send us the billing address data, however, if you have these information available, you must provide the minimum required data, which are those marked as mandatory.

In the case of tourism companies, the shipping address is not mandatory.

If in your business rule there is physical delivery of products, the delivery data (shipping), including address data (shipping.address), should be informed.

Objeto phones


Propriedade Descrição Tipo Tamanho Obrigatório
type Tipo de Telefone Integer S
ddi DDI do Telefone Integer 3 N
ddd DDD do Telefone Integer 2 S
number Número do Telefone Integer 9 S
extension Ramal do Telefone String 10 N

Importante: É obrigatório o envio de pelo menos 1 telefone.

Object phones


Property Description Type Size Mandatory
type Phone type See the list at Phone Type List Integer Y
ddi Country code Integer 3 N
ddd Area code Integer 2 Y
number Phone number Integer 9 Y
extension Phone extension String 10 N

Important: It is mandatory to send us at least one phone in the Json requisition.

Objeto paymentAddress


Propriedade Descrição Tipo Tamanho Obrigatório
street Nome do logradouro String 200 N
number Número do Endereço String 15 N
additionalInformation Complemento do Endereço String 250 N
county Bairro do Endereço String 150 N
city Cidade do Endereço String 150 N
state Sigla do Estado do Endereço - UF String 2 N
country Pais do Endereço String 150 N
zipcode CEP do Endereço String 10 N
reference Referência do Endereço String 250 N

Object paymentAddress


Property Description Type Size Mandatory
street Street name String 200 N
number Address number String 15 N
additionalInformation Address Complement String 250 N
county Address district String 150 N
city Address city String 150 N
state Address state initials String 2 N
country Address country String 150 N
zipcode Address zip code String 10 N
reference Address reference String 250 N

Objeto card


Propriedade Descrição Tipo Tamanho Obrigatório
number Número do Cartão com Máscara String 200 N
hash Hash do número do cartão String 128 N
bin 6 Primeiros Números do Cartão de Crédito String 6 S
end 4 últimos digitos do número de cartão String 4 S
type Bandeira do Cartão Integer N
validityDate Data da Expiração String 50 N
ownerName Nome de Cobrança String 150 S
document Documento da Pessoa de Cobrança String 100 N
nsu Número identificador único de uma transação de cartão String 50 N

Object card


Property Description Type Size Mandatory
number Bank card number String 200 N
hash Card number hash String 128 N
bin Bank card bin String 6 Y
end Last 4 digits of the bank card String 4 Y
type Flag type of the bank card See the list at BankCard Flag List Integer N
validityDate Expiration date String 50 N
ownerName Card holder String 150 Y
document Legal document of the card holder String 100 N
nsu Transaction identification number of the bank card String 50 N