LegalStack

МойСклад

Интеграция с МойСклад.

Создать товар или услугу в МойСклад

POST
/api/v1/integrations/moysklad/assortment
АвторизацияBearer <токен>

В: header

Тело запроса

application/json

TypeScript-определения

Используйте тип request body в TypeScript.

Тело ответа

application/json

application/problem+json

curl -X POST "https://loading/api/v1/integrations/moysklad/assortment" \  -H "Content-Type: application/json" \  -d '{    "name": "string",    "type": "product"  }'
{
  "property1": null,
  "property2": null
}
{
  "code": "string",
  "detail": "string",
  "errors": [
    {
      "name": "string",
      "pointer": "string",
      "reason": "string",
      "rule": "string"
    }
  ],
  "instance": "string",
  "request_id": "string",
  "status": 0,
  "title": "string",
  "trace_id": "string",
  "type": "http://example.com",
  "property1": null,
  "property2": null
}

Подключить МойСклад по токену

POST
/api/v1/integrations/moysklad/connect
АвторизацияBearer <токен>

В: header

Тело запроса

application/json

TypeScript-определения

Используйте тип request body в TypeScript.

token*string

Тело ответа

application/json

application/problem+json

curl -X POST "https://loading/api/v1/integrations/moysklad/connect" \  -H "Content-Type: application/json" \  -d '{    "token": "string"  }'
{
  "organizationName": "string",
  "success": true
}
{
  "code": "string",
  "detail": "string",
  "errors": [
    {
      "name": "string",
      "pointer": "string",
      "reason": "string",
      "rule": "string"
    }
  ],
  "instance": "string",
  "request_id": "string",
  "status": 0,
  "title": "string",
  "trace_id": "string",
  "type": "http://example.com",
  "property1": null,
  "property2": null
}

Создать контрагента в МойСклад

POST
/api/v1/integrations/moysklad/counterparties
АвторизацияBearer <токен>

В: header

Тело запроса

application/json

TypeScript-определения

Используйте тип request body в TypeScript.

Тело ответа

application/json

application/problem+json

curl -X POST "https://loading/api/v1/integrations/moysklad/counterparties" \  -H "Content-Type: application/json" \  -d '{    "name": "string"  }'
{
  "property1": null,
  "property2": null
}
{
  "code": "string",
  "detail": "string",
  "errors": [
    {
      "name": "string",
      "pointer": "string",
      "reason": "string",
      "rule": "string"
    }
  ],
  "instance": "string",
  "request_id": "string",
  "status": 0,
  "title": "string",
  "trace_id": "string",
  "type": "http://example.com",
  "property1": null,
  "property2": null
}

Список записей справочника МойСклад

GET
/api/v1/integrations/moysklad/dictionaries/{type}
АвторизацияBearer <токен>

В: header

Параметры пути

type*string

Параметры запроса

limit?string
offset?string
search?string

Тело ответа

application/json

application/problem+json

curl -X GET "https://loading/api/v1/integrations/moysklad/dictionaries/string"
{
  "property1": null,
  "property2": null
}
{
  "code": "string",
  "detail": "string",
  "errors": [
    {
      "name": "string",
      "pointer": "string",
      "reason": "string",
      "rule": "string"
    }
  ],
  "instance": "string",
  "request_id": "string",
  "status": 0,
  "title": "string",
  "trace_id": "string",
  "type": "http://example.com",
  "property1": null,
  "property2": null
}

Получить запись справочника МойСклад

GET
/api/v1/integrations/moysklad/dictionaries/{type}/{id}
АвторизацияBearer <токен>

В: header

Параметры пути

type*string
id*string

Тело ответа

application/json

application/problem+json

curl -X GET "https://loading/api/v1/integrations/moysklad/dictionaries/string/string"
{
  "property1": null,
  "property2": null
}
{
  "code": "string",
  "detail": "string",
  "errors": [
    {
      "name": "string",
      "pointer": "string",
      "reason": "string",
      "rule": "string"
    }
  ],
  "instance": "string",
  "request_id": "string",
  "status": 0,
  "title": "string",
  "trace_id": "string",
  "type": "http://example.com",
  "property1": null,
  "property2": null
}

Отключить МойСклад

POST
/api/v1/integrations/moysklad/disconnect
АвторизацияBearer <токен>

В: header

Тело ответа

application/json

curl -X POST "https://loading/api/v1/integrations/moysklad/disconnect"
{
  "success": true
}

Создать счёт покупателю в МойСклад

POST
/api/v1/integrations/moysklad/documents/invoiceout
АвторизацияBearer <токен>

В: header

Тело запроса

application/json

TypeScript-определения

Используйте тип request body в TypeScript.

Тело ответа

application/json

application/problem+json

curl -X POST "https://loading/api/v1/integrations/moysklad/documents/invoiceout" \  -H "Content-Type: application/json" \  -d '{    "counterpartyId": "string",    "name": "string",    "organizationId": "string",    "positions": [      {        "assortmentId": "string",        "assortmentType": "product",        "priceKopecks": 0,        "quantity": 1      }    ]  }'
{
  "property1": null,
  "property2": null
}
{
  "code": "string",
  "detail": "string",
  "errors": [
    {
      "name": "string",
      "pointer": "string",
      "reason": "string",
      "rule": "string"
    }
  ],
  "instance": "string",
  "request_id": "string",
  "status": 0,
  "title": "string",
  "trace_id": "string",
  "type": "http://example.com",
  "property1": null,
  "property2": null
}

Список документов МойСклад

GET
/api/v1/integrations/moysklad/documents/{type}
АвторизацияBearer <токен>

В: header

Параметры пути

type*string

Параметры запроса

limit?string
offset?string
search?string
filter?string
order?string

Тело ответа

application/json

application/problem+json

curl -X GET "https://loading/api/v1/integrations/moysklad/documents/string"
{
  "property1": null,
  "property2": null
}
{
  "code": "string",
  "detail": "string",
  "errors": [
    {
      "name": "string",
      "pointer": "string",
      "reason": "string",
      "rule": "string"
    }
  ],
  "instance": "string",
  "request_id": "string",
  "status": 0,
  "title": "string",
  "trace_id": "string",
  "type": "http://example.com",
  "property1": null,
  "property2": null
}

Документ МойСклад по ID с позициями

GET
/api/v1/integrations/moysklad/documents/{type}/{id}
АвторизацияBearer <токен>

В: header

Параметры пути

type*string
id*string

Тело ответа

application/json

application/problem+json

curl -X GET "https://loading/api/v1/integrations/moysklad/documents/string/string"
{
  "property1": null,
  "property2": null
}
{
  "code": "string",
  "detail": "string",
  "errors": [
    {
      "name": "string",
      "pointer": "string",
      "reason": "string",
      "rule": "string"
    }
  ],
  "instance": "string",
  "request_id": "string",
  "status": 0,
  "title": "string",
  "trace_id": "string",
  "type": "http://example.com",
  "property1": null,
  "property2": null
}

Печатная форма документа МойСклад (файл в ответе)

GET
/api/v1/integrations/moysklad/documents/{type}/{id}/print
АвторизацияBearer <токен>

В: header

Параметры пути

type*string
id*string

Параметры запроса

extension?string
Значение в"pdf" | "xls" | "ods" | "html"
templateName?string

Тело ответа

application/octet-stream

application/problem+json

application/problem+json

curl -X GET "https://loading/api/v1/integrations/moysklad/documents/string/string/print"
{
  "property1": null,
  "property2": null
}
{
  "code": "string",
  "detail": "string",
  "errors": [
    {
      "name": "string",
      "pointer": "string",
      "reason": "string",
      "rule": "string"
    }
  ],
  "instance": "string",
  "request_id": "string",
  "status": 0,
  "title": "string",
  "trace_id": "string",
  "type": "http://example.com",
  "property1": null,
  "property2": null
}
{
  "code": "string",
  "detail": "string",
  "errors": [
    {
      "name": "string",
      "pointer": "string",
      "reason": "string",
      "rule": "string"
    }
  ],
  "instance": "string",
  "request_id": "string",
  "status": 0,
  "title": "string",
  "trace_id": "string",
  "type": "http://example.com",
  "property1": null,
  "property2": null
}

Список сущностей справочника МойСклад (расширенный набор типов)

GET
/api/v1/integrations/moysklad/entities/{type}
АвторизацияBearer <токен>

В: header

Параметры пути

type*string

Параметры запроса

limit?string
offset?string
search?string
filter?string
order?string

Тело ответа

application/json

application/problem+json

curl -X GET "https://loading/api/v1/integrations/moysklad/entities/string"
{
  "property1": null,
  "property2": null
}
{
  "code": "string",
  "detail": "string",
  "errors": [
    {
      "name": "string",
      "pointer": "string",
      "reason": "string",
      "rule": "string"
    }
  ],
  "instance": "string",
  "request_id": "string",
  "status": 0,
  "title": "string",
  "trace_id": "string",
  "type": "http://example.com",
  "property1": null,
  "property2": null
}

Сущность справочника МойСклад по ID (расширенный набор типов)

GET
/api/v1/integrations/moysklad/entities/{type}/{id}
АвторизацияBearer <токен>

В: header

Параметры пути

type*string
id*string

Тело ответа

application/json

application/problem+json

curl -X GET "https://loading/api/v1/integrations/moysklad/entities/string/string"
{
  "property1": null,
  "property2": null
}
{
  "code": "string",
  "detail": "string",
  "errors": [
    {
      "name": "string",
      "pointer": "string",
      "reason": "string",
      "rule": "string"
    }
  ],
  "instance": "string",
  "request_id": "string",
  "status": 0,
  "title": "string",
  "trace_id": "string",
  "type": "http://example.com",
  "property1": null,
  "property2": null
}

Разрешить сущность МойСклад в каноническую форму

GET
/api/v1/integrations/moysklad/resolve/{type}/{id}
АвторизацияBearer <токен>

В: header

Параметры пути

type*string
id*string

Тело ответа

application/json

application/problem+json

curl -X GET "https://loading/api/v1/integrations/moysklad/resolve/string/string"
{
  "property1": null,
  "property2": null
}
{
  "code": "string",
  "detail": "string",
  "errors": [
    {
      "name": "string",
      "pointer": "string",
      "reason": "string",
      "rule": "string"
    }
  ],
  "instance": "string",
  "request_id": "string",
  "status": 0,
  "title": "string",
  "trace_id": "string",
  "type": "http://example.com",
  "property1": null,
  "property2": null
}

Поиск сущностей в МойСклад

GET
/api/v1/integrations/moysklad/search/{type}
АвторизацияBearer <токен>

В: header

Параметры пути

type*string

Параметры запроса

q?string
limit?string

Тело ответа

application/json

application/problem+json

curl -X GET "https://loading/api/v1/integrations/moysklad/search/string"
{
  "property1": null,
  "property2": null
}
{
  "code": "string",
  "detail": "string",
  "errors": [
    {
      "name": "string",
      "pointer": "string",
      "reason": "string",
      "rule": "string"
    }
  ],
  "instance": "string",
  "request_id": "string",
  "status": 0,
  "title": "string",
  "trace_id": "string",
  "type": "http://example.com",
  "property1": null,
  "property2": null
}

Статус подключения МойСклад

GET
/api/v1/integrations/moysklad/status
АвторизацияBearer <токен>

В: header

Тело ответа

application/json

curl -X GET "https://loading/api/v1/integrations/moysklad/status"
{
  "connected": true,
  "status": "connected"
}