Entities

Change an establishment

PATCH
/v1/ec/entities/{id}/establishments/{code}

Its name, address or code, on all the series it has in your key's environment: the address and name are stored on each one. The code can only change while it has not numbered any document (409); outside sandbox the new code must be listed as open in the SRI registry. 409 also if a series with the new code already exists.

Authorization

AuthorizationBearer <token>

Your API key, which acts for the one business it was created for: fb_sandbox_… issues in sandbox, fb_test_… in test, the tax authority's testing service, and fb_live_… in live.

In: header

Path Parameters

id*string
Formatuuid
code*string
Match^\d{3}$

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

code?string

The establishment's code. It can only change while it has not numbered any document (409 if it has). Outside sandbox it must be listed as open in the SRI registry.

Match^\d{3}$
name?|

What you call it; null clears the name.

Length1 <= length <= 80
address?string

The establishment's address. When changing the code outside sandbox, without it the SRI registry's address is used.

Length1 <= length <= 300

Response Body

application/json

application/problem+json

application/problem+json

application/problem+json

application/problem+json

application/problem+json

application/problem+json

curl -X PATCH "https://example.com/v1/ec/entities/497f6eca-6276-4993-bfeb-53cbbbba6f08/establishments/string" \  -H "Content-Type: application/json" \  -d '{}'
{  "object": "series_update",  "data": [    {      "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",      "object": "series",      "entity_id": "8161163a-f227-466f-bc01-090a01e80165",      "country": "ec",      "environment": "sandbox",      "document_type": "invoice",      "establishment": "string",      "emission_point": "string",      "establishment_address": "string",      "establishment_name": "string",      "emission_point_name": "string",      "last_number": 0,      "issued_today": 0,      "active": true,      "created_at": "2019-08-24T14:15:22Z"    }  ]}