Organizations Service


Access info

Endpoint https://organizations-api.socrate.io/graphql
Required access keys Tenant-level service access key
Pricing Please contact us for details at contact@bitsoftware.ro
Notes To call the service, the access key must be provided in the x-api-key header of the HTTP request. If you are using the GraphQL console, you can view the service’s documentation and schema only after entering an access key. Make sure that the scope of the key allows access to the queries and mutations that you require. For example, to grant the key access to all queries and mutations, the keys’s scope must be set to organizations-api:query:* organizations-api:mutation:*.

Usage

The Organizations service enables you to manage (create, update, delete) organizations that belong to the same tenant. In the SBS entity model, an organization is an entity typically identified by an unique Tax Identification Number (TIN). For example, multiple organizations could exist as subsidiaries under a mother company (which is also an organization), and the whole structure is isolated within the boundaries of a single tenant. You typically create organizations in order to support submissions to the Romanian National Fiscal Authority (ANAF), for the purpose of tax declarations, transport declarations (E-Transport), or electronic invoices (E-Factura).

Queries

organization

Returns an organization given the organization ID.

Arguments

Argument Type Description
id ID! Mandatory. The ID of the organization to be retrieved.

Result

The result is a object of type Organization.

organizations

Returns a list of organizations defined for the given tenant, optionally filtered by specific organization IDs.

Arguments

Argument Type Description
filter OrganizationsFilter Optional. Provides the ability to filter results by organization ID.
OrganizationsFilter input
Attribute Type Description
ids [ID!] Mandatory. Specifies an array of organization IDs by which the results should be filtered.
active Boolean Optional. Set this filter to true to retrieve only organizations marked as active, false otherwise.

Result

The result is an array of Organization.

Organization type
Attribute Type Description
id ID! Specifies the organization’s unique identifier.
validFrom Date Specifies the date when the organization was registered, in YYYY-MM-DD format.
name String Specifies the organization’s name.
tin String Specifies the organization’s tax identification number (TIN) (in Romanian, CIF - cod de identificare fiscală) issued by ANAF (in Romanian, ANAF - Agenția Națională de Administrare Fiscală).
regNo String Specifies the organization’s registration number issued by the National Trade Registration Office (in Romanian, ONRC - Oficiul National al Registrului Comerțului).
caenNo String Specifies the organization’s number registered in the CAEN nomenclature (in Romanian, CAEN - Clasificarea activităților din economia națională).
taxType String Identifies the type of tax regime to which this entry applies. Valid values originate in the nomenclature Nomenclator_Regim_fiscal and are as follows: 100010 - Taxable person registered for VAT purposes, 100020 - Taxable person applying the special exemption scheme for small enterprises, 100030 - Taxable person who has the VAT code canceled ex officio, based on Law 227/2015 on the Fiscal Code, art. 316 para. (11), 100040 - Taxable person registered for VAT purposes, who applies the VAT system on collection, 100050 - Non-taxable person.
country CountryCode Enum value that identifies the ISO 3166-2 two-letter country code.
region String Identifies the regions/counties/provinces within the tax authority. Preferably described according to ISO 3166-1A2 - RO Dept Codes. Example: RO-AB for Alba county in Romania.
streetAddress Address Specifies the organization’s street address.
postalAddress Address Specifies the organization’s postal address.
billingAddress Address Specifies the organization’s billing address.
shipToAddress Address Specifies the organization’s “ship to” address.
shipFromAddress Address Specifies the organization’s “ship from” address.
email EmailAddress Specifies the organization’s email.
phone String Specifies the organization’s phone number.
bankAccounts [BankAccount] The list of organization’s bank accounts.
taxAccountingBasis TaxAccountingBasis Valid values: A - for Accounting for general commercial companies which apply double-entry bookkeeping and the general business chart of accounts, I - for Invoice Accounting (Non-Residents), IFRS - for general commercial companies that apply double-entry taxability at the same time as the provisions of OMFP 2844/2016 (IFRS chart of accounts), BANK - for credit institutions and non-bank financial institutions that apply apply double-entry bookkeeping and chart of accounts for banks and financial-monetary institutions, INSURANCE - for insurance companies applying applies double entry taxation and chart of accounts for insurance companies, NORMA39 - for the leasing and financial companies which use the IFRS account plan according the Reg no. 39/2015 of the Authority for Financial Supervision (ASF), IFN - for non-bank financial institutions in Romania, that use the account plan according to the BNR Regulation no. 17/2015, NORMA36 - for insurance and/or reinsurance brokerage companies which use the account plan according to the regulation no. 36/2015 of the Authority for Financial Supervision (ASF), NORMA14 - for private pension companies which use the account plan according to the regulation no. 14/2015 of the Authority for Financial Supervision (ASF), ONG - for companies without patrimonial purpose (non-government organizations) according to the OMFP no. 3103/2017.
createdAt DateTime The date and time when the organization record was created in SBS.
active Boolean A Boolean flag that marks organization as not active if set to false. Inactive organizations do not appear in the graphical user interface of the SBS Portal. This flag may also be used for other purposes in your application. Note that it does not affect processing organizations in SBS as such (for example, it is still possible to generate a tax declaration even if the organization is not active).
Address type
Attribute Type Description
streetName String The street name.
number String The street number.
additionalAddressDetails String Any additional address details that don’t fit elsewhere.
building String The building identifier, if applicable.
city String The city.
postalCode String The postal code.
region String The region/county/province.
country CountryCode Enum value that identifies the ISO 3166-2 two-letter country code.
BankAccount type
Attribute Type Description
ibanNumber String The international bank account number (IBAN).
bankAccountNumber String The bank account number.
bankAccountName String The bank account name.
sortCode String The bank sorting code.

version

Returns the API version.

Mutations

createOrganization

Creates an organization. Once an organization is created, it can be referenced multiple times by different declarations.

Arguments

Argument Type Description
input CreateOrganizationInput! Mandatory. Used to provide the organization’s details as input.
CreateOrganizationInput input
Attribute Type Description
validFrom Date Specifies the date when the organization was registered.
name String Specifies the organization’s name.
tin String Specifies the organization’s tax identification number (TIN) (in Romanian, CIF - cod de identificare fiscală) issued by ANAF (in Romanian, ANAF - Agenția Națională de Administrare Fiscală).
regNo String! Specifies the organization’s registration number issued by the National Trade Registration Office (in Romanian, ONRC - Oficiul National al Registrului Comerțului).
caenNo String Specifies the organization’s number registered in the CAEN nomenclature (in Romanian, CAEN - Clasificarea activităților din economia națională).
taxType String Identifies the type of tax regime to which this entry applies. Valid values originate in the nomenclature Nomenclator_Regim_fiscal and are as follows: 100010 - Taxable person registered for VAT purposes, 100020 - Taxable person applying the special exemption scheme for small enterprises, 100030 - Taxable person who has the VAT code canceled ex officio, based on Law 227/2015 on the Fiscal Code, art. 316 para. (11), 100040 - Taxable person registered for VAT purposes, who applies the VAT system on collection, 100050 - Non-taxable person.
country CountryCode! Mandatory. Enum value that identifies the ISO 3166-2 two-letter country code.
region String Identifies the regions/counties/provinces within the tax authority. Preferably described according to ISO 3166-1A2 - RO Dept Codes. Example: RO-AB for Alba county in Romania.
streetAddress Address Specifies the organization’s street address.
postalAddress Address Specifies the organization’s postal address.
billingAddress Address Specifies the organization’s billing address.
shipToAddress Address Specifies the organization’s “ship to” address.
shipFromAddress Address Specifies the organization’s “ship from” address.
email EmailAddress Specifies the organization’s email.
phone String Specifies the organization’s phone number.
bankAccounts [BankAccount] The list of organization’s bank accounts.
taxAccountingBasis TaxAccountingBasis Valid values: A - for Accounting for general commercial companies which apply double-entry bookkeeping and the general business chart of accounts, I - for Invoice Accounting (Non-Residents), IFRS - for general commercial companies that apply double-entry taxability at the same time as the provisions of OMFP 2844/2016 (IFRS chart of accounts), BANK - for credit institutions and non-bank financial institutions that apply apply double-entry bookkeeping and chart of accounts for banks and financial-monetary institutions, INSURANCE - for insurance companies applying applies double entry taxation and chart of accounts for insurance companies, NORMA39 - for the leasing and financial companies which use the IFRS account plan according the Reg no. 39/2015 of the Authority for Financial Supervision (ASF), IFN - for non-bank financial institutions in Romania, that use the account plan according to the BNR Regulation no. 17/2015, NORMA36 - for insurance and/or reinsurance brokerage companies which use the account plan according to the regulation no. 36/2015 of the Authority for Financial Supervision (ASF), NORMA14 - for private pension companies which use the account plan according to the regulation no. 14/2015 of the Authority for Financial Supervision (ASF), ONG - for companies without patrimonial purpose (non-government organizations) according to the OMFP no. 3103/2017.

Result

See the Organization type.

deleteOrganization

Deletes an organization.

Arguments

Argument Type Description
id ID! Mandatory. Used to provide the ID of the organization that is to be deleted.

Result

See the Organization type.

updateOrganization

Updates an organization.

Arguments

Argument Type Description
id ID! Mandatory. Used to provide the ID of the organization that is to be updated.
input UpdateOrganizationInput! Mandatory. Used to provide the organization’s details as input.
UpdateOrganizationInput input
Attribute Type Description
validFrom Date Specifies the date when the organization was registered.
name String Specifies the organization’s name.
tin String Specifies the organization’s tax identification number (TIN) (in Romanian, CIF - cod de identificare fiscală) issued by ANAF (in Romanian, ANAF - Agenția Națională de Administrare Fiscală).
regNo String! Specifies the organization’s registration number issued by the National Trade Registration Office (in Romanian, ONRC - Oficiul National al Registrului Comerțului).
caenNo String Specifies the organization’s number registered in the CAEN nomenclature (in Romanian, CAEN - Clasificarea activităților din economia națională).
taxType String Identifies the type of tax regime to which this entry applies. Valid values originate in the nomenclature Nomenclator_Regim_fiscal and are as follows: 100010 - Taxable person registered for VAT purposes, 100020 - Taxable person applying the special exemption scheme for small enterprises, 100030 - Taxable person who has the VAT code canceled ex officio, based on Law 227/2015 on the Fiscal Code, art. 316 para. (11), 100040 - Taxable person registered for VAT purposes, who applies the VAT system on collection, 100050 - Non-taxable person.
country CountryCode Enum value that identifies the ISO 3166-2 two-letter country code.
region String Identifies the regions/counties/provinces within the tax authority. Preferably described according to ISO 3166-1A2 - RO Dept Codes. Example: RO-AB for Alba county in Romania.
streetAddress Address Specifies the organization’s street address.
postalAddress Address Specifies the organization’s postal address.
billingAddress Address Specifies the organization’s billing address.
shipToAddress Address Specifies the organization’s “ship to” address.
shipFromAddress Address Specifies the organization’s “ship from” address.
email EmailAddress Specifies the organization’s email.
phone String Specifies the organization’s phone number.
bankAccounts [BankAccount] The list of organization’s bank accounts.
taxAccountingBasis TaxAccountingBasis Valid values: A - for Accounting for general commercial companies which apply double-entry bookkeeping and the general business chart of accounts, I - for Invoice Accounting (Non-Residents), IFRS - for general commercial companies that apply double-entry taxability at the same time as the provisions of OMFP 2844/2016 (IFRS chart of accounts), BANK - for credit institutions and non-bank financial institutions that apply apply double-entry bookkeeping and chart of accounts for banks and financial-monetary institutions, INSURANCE - for insurance companies applying applies double entry taxation and chart of accounts for insurance companies, NORMA39 - for the leasing and financial companies which use the IFRS account plan according the Reg no. 39/2015 of the Authority for Financial Supervision (ASF), IFN - for non-bank financial institutions in Romania, that use the account plan according to the BNR Regulation no. 17/2015, NORMA36 - for insurance and/or reinsurance brokerage companies which use the account plan according to the regulation no. 36/2015 of the Authority for Financial Supervision (ASF), NORMA14 - for private pension companies which use the account plan according to the regulation no. 14/2015 of the Authority for Financial Supervision (ASF), ONG - for companies without patrimonial purpose (non-government organizations) according to the OMFP no. 3103/2017.
active Boolean A Boolean flag that marks organization as not active if set to false. Inactive organizations do not appear in the graphical user interface of the SBS Portal. This flag may also be used for other purposes in your application. Note that it does not affect processing organizations in SBS as such (for example, it is still possible to generate a tax declaration even if the organization is not active).

Result

See the Organization type.