Costos del Servicio
1 min
Este API permite configurar el costo de servicio de una entidad/comercio asignando el paquete elegido. Deberá conocer previamente el ID del Paquete o Costo de servicio a asociar.
Asignar o Cambiar
Este endpoint le permitirá asignar o cambiar el Costo de Servicio
POST
https://api.sugaway.com/p/operator/service/entity/:eid
Path Parameters
- eidstringrequiredDescription
Header Parameters
- x-api-keystringDescription
- x-access-tokenstringDescription
Body Parameters
- sidstringrequiredDescription
curl
curl --location --request POST 'https://api.sugaway.com/p/operator/entity' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--data-raw '{"reference":"string","legalName":"string","name":"string","taxIdType":"string","taxId":"string","mcc":"string","country":"string","address":"Object","zipCode":"string","city":"string","state":"string"}'nodejs
var request = require('request');
var options = {
'method': 'POST',
'url': 'https://api.sugaway.com/p/operator/entity',
'headers': {
'Accept': 'application/json',
'Content-Type': 'application/json'
},
body: JSON.stringify({
"reference": "string",
"legalName": "string",
"name": "string",
"taxIdType": "string",
"taxId": "string",
"mcc": "string",
"country": "string",
"address": "Object",
"zipCode": "string",
"city": "string",
"state": "string"
})
};
request(options, function (error, response) {
if (error) throw new Error(error);
console.log(response.body);
});
javascript
var myHeaders = new Headers();
myHeaders.append("Accept", "application/json");
myHeaders.append("Content-Type", "application/json");
var raw = JSON.stringify({
"reference": "string",
"legalName": "string",
"name": "string",
"taxIdType": "string",
"taxId": "string",
"mcc": "string",
"country": "string",
"address": "Object",
"zipCode": "string",
"city": "string",
"state": "string"
});
var requestOptions = {
method: 'POST',
headers: myHeaders,
body: raw,
redirect: 'follow'
};
fetch("https://api.sugaway.com/p/operator/entity", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));python
import requests
import json
url = "https://api.sugaway.com/p/operator/entity"
payload = json.dumps({
"reference": "string",
"legalName": "string",
"name": "string",
"taxIdType": "string",
"taxId": "string",
"mcc": "string",
"country": "string",
"address": "Object",
"zipCode": "string",
"city": "string",
"state": "string"
})
headers = {
'Accept': 'application/json',
'Content-Type': 'application/json'
}
response = requests.request("POST", url, headers=headers, data=payload)
print(response.text)
ruby
require "uri"
require "json"
require "net/http"
url = URI("https://api.sugaway.com/p/operator/entity")
https = Net::HTTP.new(url.host, url.port)
https.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Accept"] = "application/json"
request["Content-Type"] = "application/json"
request.body = JSON.dump({
"reference": "string",
"legalName": "string",
"name": "string",
"taxIdType": "string",
"taxId": "string",
"mcc": "string",
"country": "string",
"address": "Object",
"zipCode": "string",
"city": "string",
"state": "string"
})
response = https.request(request)
puts response.read_body
200
{
"result": true,
"data": {
"uid": "",
"reference": ""
}
}