The “Shop” Concept

In Take a NAP, every online store or Software as a Service (SaaS) platform is considered a “Shop.” This terminology encompasses a broad range of entities that engage in online commerce, regardless of their size or specific business model.

Why “Shop”?

The reason for this classification is that each Shop within Take a NAP has the legal capability to:

  • Issue Digital Receipts: For transactions, aligning with the modern need for electronic documentation.
  • Send Audit XML Files: To the Bulgarian National Revenue Agency (NRA), ensuring compliance with legal requirements.

Compliance Made Easy

These functionalities are integral to complying with Bulgarian laws and regulations related to online commerce. By unifying these diverse entities under the concept of a Shop, Take a NAP provides a streamlined and consistent interface for managing essential compliance tasks.

For All Business Types

Whether you are a single online store or a multi-platform SaaS provider, Take a NAP’s Shop structure offers the tools and flexibility needed to ensure seamless integration with the regulatory environment.

Managing Shops

In this section, we’ll cover how to create, update, and delete shops using the Take a NAP API. Depending on the API key issued, you may create a single store or multiple stores (for store platforms).

Creating a Shop

Use the following endpoint to create a store:

POST /public-api/v1/shop
const axios = require('axios');

axios
  .post('https://api.takeanap.bg/public-api/v1/shop', {
    name: 'My Store',
    domain: 'mystore.com',
    customerPhone: '+359888888888',
    customerEmail: '[email protected]',
    nraNumber: 'RF12312312',
    companyUic: '200300400',
    companyName: 'Фирма ООД',
    companyAddress: 'ул. Горно Нанадолнище 7',
    vatGroup: 'GROUP_B',
    auditGenerationDay: 12,
    auditRecipientEmails: ['[email protected]'],
    auditNoReceiptOrders: true,
    returnPaymentMethod: 'IBAN',
    receiptStartNumber: 1,
  })
  .then((response) => {
    console.log('Shop created:', response.data);
  })
  .catch((error) => {
    console.error('Error creating shop:', error);
  });

Headers

  • x-api-key: Take a NAP API key
  • x-signature: Signed payload with Take a NAP API secret

Request Body

Refer to the CreateShopDto schema in the API reference.

Response

Refer to the ShopDto schema in the API reference.

Multiple Stores Creation (for store platforms)

If your API key allows for the creation of multiple stores, you can use the same endpoint as above.


Updating a Shop

Use the following endpoint to update a shop:

PUT /public-api/v1/shop/{id}
const axios = require('axios');

axios
  .put(
    'https://api.takeanap.bg/public-api/v1/shop/1b5d1089-6f89-49bc-aad5-0c29404f44e2',
    {
      name: 'My Cool Store',
    },
  )
  .then((response) => {
    console.log(response.data);
  })
  .catch((error) => {
    console.log(error);
  });

Headers

  • x-signature: Signed payload with Take a NAP API secret
  • x-api-key: Take a NAP API key

Request Body

Refer to the UpdateShopDto schema in the API reference.

Response

Refer to the ShopDto schema in the API reference.


Deleting a Shop

Use the following endpoint to delete a shop:

DELETE /public-api/v1/shop/{id}

When a shop is deleted, all associated data including orders, receipts, and audit files are also permanently deleted. This action is irreversible, so please proceed with caution.


const axios = require('axios');

axios
  .delete('https://api.takeanap.bg/public-api/v1/shop', { name: 'My Store' })
  .then((response) => {
    console.log('Shop deleted:', response.data);
  })
  .catch((error) => {
    console.log('Error deleting shop:', error);
  });

Headers

  • x-api-key: Take a NAP API key
  • x-signature: Signed payload with Take a NAP API secret

Request Body

Refer to the DeleteShopDto schema in the API reference.

Response

Refer to the DeleteShopResponseDto schema in the API reference.


For more details on the request and response schemas, please refer to the official API reference. If you encounter any issues or have questions, please contact our support team.