LegalStack

Интеграция 1С

Интеграция с 1С.

Подключить 1С

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

В: header

Тело запроса

application/json

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

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

Тело ответа

application/json

application/problem+json

curl -X POST "https://loading/api/v1/integrations/1c/connect" \  -H "Content-Type: application/json" \  -d '{    "baseUrl": "string",    "login": "string",    "password": "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
}

Отключить 1С

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

В: header

Тело ответа

application/json

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

Список документов 1С

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

В: header

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

resource?string
top?string
skip?string
filter?string
orderby?string
select?string

Тело ответа

application/json

application/problem+json

curl -X GET "https://loading/api/v1/integrations/1c/documents"
{
  "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
}

Создать документ в 1С

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

В: header

Тело запроса

application/json

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

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

Тело ответа

application/json

application/problem+json

curl -X POST "https://loading/api/v1/integrations/1c/documents" \  -H "Content-Type: application/json" \  -d '{    "data": {      "property1": null,      "property2": null    },    "resource": "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
}

Получить документ 1С

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

В: header

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

refKey*string

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

resource?string

Тело ответа

application/json

application/problem+json

curl -X GET "https://loading/api/v1/integrations/1c/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
}

Обновить документ в 1С

PATCH
/api/v1/integrations/1c/documents/{refKey}
АвторизацияBearer <токен>

В: header

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

refKey*string

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

resource?string

Тело запроса

application/json

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

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

Тело ответа

application/json

application/problem+json

curl -X PATCH "https://loading/api/v1/integrations/1c/documents/string" \  -H "Content-Type: application/json" \  -d '{    "data": {      "property1": null,      "property2": null    }  }'
{
  "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
}

Удалить документ в 1С

DELETE
/api/v1/integrations/1c/documents/{refKey}
АвторизацияBearer <токен>

В: header

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

refKey*string

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

resource?string

Тело ответа

application/json

application/problem+json

curl -X DELETE "https://loading/api/v1/integrations/1c/documents/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
}

Получить сырые OData-метаданные 1С

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

В: header

Тело ответа

application/json

curl -X GET "https://loading/api/v1/integrations/1c/metadata"
{
  "property1": null,
  "property2": null
}

Отправить данные в 1С с маппингом полей

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

В: header

Тело запроса

application/json

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

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

Тело ответа

application/json

application/problem+json

curl -X POST "https://loading/api/v1/integrations/1c/push" \  -H "Content-Type: application/json" \  -d '{    "data": {      "property1": null,      "property2": null    },    "fieldMapping": {      "property1": "string",      "property2": "string"    },    "resource": "string"  }'
{
  "refKey": "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
}

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

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

В: header

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

type*string
id*string

Тело ответа

application/json

application/problem+json

curl -X GET "https://loading/api/v1/integrations/1c/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
}

Список OData-ресурсов 1С

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

В: header

Тело ответа

application/json

curl -X GET "https://loading/api/v1/integrations/1c/resources"
{
  "property1": null,
  "property2": null
}

Получить список полей ресурса 1С

GET
/api/v1/integrations/1c/resources/{resource}/fields
АвторизацияBearer <токен>

В: header

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

resource*string

Тело ответа

application/json

curl -X GET "https://loading/api/v1/integrations/1c/resources/string/fields"
{
  "property1": null,
  "property2": null
}

Поиск сущностей в 1С

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

В: header

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

type*string

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

q?string
limit?string

Тело ответа

application/json

application/problem+json

curl -X GET "https://loading/api/v1/integrations/1c/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
}

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

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

В: header

Тело ответа

application/json

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