Update the Company Billing details

Sandbox endpoint

https://api.platform.sandbox.easytranslate.com/api/v1/teams/:team_name/billing

In order to update your company's billing details, you need to send a PUT request

In your request's header, you first need to add your access token, to do so, simply add "Authorization" as a key and "Bearer {{ACCESS_TOKEN}}" (instead of {{ACCESS_TOKEN}}, you should provide your access token), you then need to specify that json should be accepted and that it should be the content type. To do so, add "Accept" as a key and "application/json" as its value and Content-Type as a key and "application/json" as its value. 

 

Then, you need to add a variable to your endpoint path: 

    • Team_name: {{TEAM_NAME}} 
      Instead of {{TEAM_NAME}}, you need to provide the team_name of your team. It can be retrieved from the api/v1/user endpoint. 

Finally, you need to pass the following data to your body: 

{
"data": {
"type": "billing",
"attributes": {
"postalcode": 2200,
"address": "Fake Address",
"city": "Copenhagen",
"country": "DK",
"currency": "USD",
"automation_price_limit": 10000,
"vat_number": "DK12345678"
}
}
}
    • type:  The type should be "billing" 
    • postalcode: The postal code of your company
    • address: The address of your company 
    • city: The city where your company is located
    • country: The country where your company is located
    • currency: The currency you want to use
    • automation_price_limit: The price limit determines when you need to approve a project price. All the projects under that price limit will automatically be approved. Please note that the automation_price_limit is always in EUR and in cents. If the desired amount is 100EUR, the automation_price_limit value should be "10000"
    • vat_number: Your country's VAT number. If you are having issues finding it, please look at this link

 

Sandbox request example

curl --location -g --request PUT 'https://api.platform.sandbox.easytranslate.com/api/v1/teams/{{TEAM_NAME}}/billing' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer {{ACCESS_TOKEN}}' \
--header 'Content-Type: application/json' \
--data-raw '{
"data": {
"type": "billing",
"attributes": {
"postalcode": 2200,
"address": "Fake Address",
"city": "Copenhagen",
"country": "DK",
"currency": "USD",
"automation_price_limit": 10000,
"vat_number": "DK12345678"
}
}
}'

 

Sandbox response example

{
"data": {
"id": "c9da807b-21d2-4277-a6c2-dc4611e6695d",
"type": "billing",
"attributes": {
"address": "Fake Address",
"postcode": "2100",
"city": "Copenhagen",
"country": "DK",
"currency": "USD",
"automation_price_limit": 10000,
"payment_service_id": "cus_HuVZvyrcpx6Idc",
"vat_number": "DK12345678",
"has_valid_vat": true,
"created_at": "2020-08-27T08:34:13.000000Z",
"updated_at": "2020-08-27T09:19:48.000000Z",
"methods": [
{
"id": "2c4c1cdf-7d70-42aa-bf9c-7a04e673d68b",
"type": "billing_method_card",
"attributes": {
"is_default": true,
"method": "digital",
"payment_method_token": "pm_1HKgZwHbEySjdvVGaRuely7g",
"created_at": "2020-08-27T08:35:29.000000Z",
"updated_at": "2020-08-27T08:35:30.000000Z",
"card": {
"brand": "visa",
"last4": "4242",
"country": "US",
"exp_year": 2024,
"exp_month": 4
}
}
}
]
}
},
"meta": {
"copyright": "Copyright 2020 EasyTranslate A/S",
"environment": "sandbox"
}
}