Update logged team account details

Update the account details

Sandbox endpoint 

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

In order to update the account 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. To do so, add "Accept" 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 request body: 

{
"data": {
"type": "account",
"id": "{{CUSTOMER_ACCOUNT_ID}}",
"attributes": {
"company_name": "Acme Inc.",
"company_email": "acme@inc.com",
"invoice_language": "en",
"receipt_email": "acme@inc.com"
}
}
}
    • type: The type should be "account". 
    • id: This should be where you add your customer account ID. 
    • company_name: This value should be your company name.
    • company_email: This value should be your company email. 
    • invoice_language: This value should be the language code your invoice should be in. 
    • receipt_email: This value should be the email receiving the invoices. 

Sandbox request example

curl --location -g --request PUT 'https://api.platform.sandbox.easytranslate.com/api/v1/teams/{{TEAM_NAME}}/' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer {{ACCESS_TOKEN}}' \
--data-raw '{
"data": {
"type": "account",
"id": "9b405081-cad8-4553-b0be-6f440853bb7e",
"attributes": {
"company_name": "Deadpool",
"company_email": "deadpool@easytranslate.com",
"invoice_language": "en",
"receipt_email": "deadpool-receipt@easytranslate.com"
}
}
}'

 

Sandbox response example 

{
"data": {
"type": "account",
"id": "9b405081-cad8-4553-b0be-6f440853bb7e",
"attributes": {
"company_name": "Deadpool",
"company_email": "deadpool@easytranslate.com",
"team_identifier": "deadpool",
"is_parent": true,
"invoice_language": "en",
"receipt_email": "deadpool-receipt@easytranslate.com",
"created_at": "2020-08-27T08:34:13.000000Z",
"updated_at": "2020-08-27T09:31:17.000000Z",
"alerts": {
"conversations": []
}
},
"relationships": []
},
"meta": {
"copyright": "Copyright 2020 EasyTranslate A/S",
"environment": "sandbox"
}
}