๐Ÿ”ขStock transfer numbering

This page provides a description of the available API routes for managing stock transfer numberings.

When stock transfer is created, the documentNumber field is generated by server, based on stock transfer numbering settings. API methods listed below provides way to modify numbering settings.

API methods

Get stock transfer numberings

GET http://{server-address}/stocktransfernumberings

Returns all stock transfer numberings that matches query parameters. Result is of type QueryResult<StockTransferNumbering>.

Query Parameters

Headers

{
    "items":
    [
        {
            "id": "59919dc4c5960398d3774162",
            "isActive": true,
            "type": "Outcome",
            "format": "V-{yyyy}{MM}{i4}",
            "repeat": true,
            "numberings":
            [
                {
                    "isActive": true,
                    "createdAt": "2023-01-01T00:00:00Z",
                    "startAt": "2023-01-01T00:00:00Z",
                    "period":
                    {
                        "unit": "Month",
                        "amount": 1
                    },
                    "currentNumber": 1
                }
            ],
            "_v": 1
        },
        {
            "id": "59919dcac5960398d3774163",
            "isActive": true,
            "type": "Transfer",
            "format": "T-{yyyy}{MM}{i4}",
            "repeat": true,
            "numberings":
            [
                {
                    "isActive": true,
                    "createdAt": "2023-01-01T00:00:00Z",
                    "startAt": "2023-01-01T00:00:00Z",
                    "period":
                    {
                        "unit": "Month",
                        "amount": 1
                    },
                    "currentNumber": 1
                }
            ],
            "_v": 1
        },
        {
            "id": "59919e02c5960398d3774165",
            "isActive": true,
            "type": "Correction",
            "format": "K-{yyyy}{MM}{i4}",
            "repeat": true,
            "numberings":
            [
                {
                    "isActive": true,
                    "createdAt": "2023-01-01T00:00:00Z",
                    "startAt": "2023-01-01T00:00:00Z",
                    "period":
                    {
                        "unit": "Month",
                        "amount": 1
                    },
                    "currentNumber": 1
                }
            ],
            "_v": 1
        },
        {
            "id": "59919dd9c5960398d3774164",
            "isActive": true,
            "type": "Invoice",
            "format": "FA-{yyyy}{i4}",
            "repeat": true,
            "numberings":
            [
                {
                    "isActive": true,
                    "createdAt": "2022-01-01T00:00:00Z",
                    "startAt": "2022-01-01T00:00:00Z",
                    "period":
                    {
                        "unit": "Year",
                        "amount": 1
                    },
                    "currentNumber": 12
                },
                {
                    "isActive": true,
                    "createdAt": "2023-01-16T09:01:55.711Z",
                    "startAt": "2023-01-01T00:00:00Z",
                    "period":
                    {
                        "unit": "Year",
                        "amount": 1
                    },
                    "currentNumber": 8
                }
            ],
            "_v": 1
        }
    ],
    "count": 4,
    "totalCount": 4
}

Get stock transfer numbering

GET http://{server-address}/stocktransfernumberings/{id}

Result is of type StockTransferNumbering.

Path Parameters

Headers

{
    "id": "59919dd9c5960398d3774164",
    "isActive": true,
    "type": "Invoice",
    "format": "FA-{yyyy}{i4}",
    "repeat": true,
    "numberings":
    [
        {
            "isActive": true,
            "createdAt": "2022-01-01T00:00:00Z",
            "startAt": "2022-01-01T00:00:00Z",
            "period":
            {
                "unit": "Year",
                "amount": 1
            },
            "currentNumber": 12
        },
        {
            "isActive": true,
            "createdAt": "2023-01-16T09:01:55.711Z",
            "startAt": "2023-01-01T00:00:00Z",
            "period":
            {
                "unit": "Year",
                "amount": 1
            },
            "currentNumber": 8
        }
    ],
    "_v": 1
}

Create stock transfer numbering

POST http://{server-address}/stocktransfernumberings

Creates new stock transfer numbering. Result is of type StockTransferNumbering.

Required rights

Authorized user must have StockTransferNumberingCreate right assigned.

Headers

Request Body

{
    "id": "59919dd9c5960398d3774164",
    "isActive": true,
    "type": "Invoice",
    "format": "FA-{yyyy}{i4}",
    "repeat": true,
    "numberings":
    [
        {
            "isActive": true,
            "createdAt": "2022-01-01T00:00:00Z",
            "startAt": "2022-01-01T00:00:00Z",
            "period":
            {
                "unit": "Year",
                "amount": 1
            },
            "currentNumber": 12
        },
        {
            "isActive": true,
            "createdAt": "2023-01-16T09:01:55.711Z",
            "startAt": "2023-01-01T00:00:00Z",
            "period":
            {
                "unit": "Year",
                "amount": 1
            },
            "currentNumber": 8
        }
    ],
    "_v": 1
}

Create or update stock transfer numbering

PUT http://{server-address}/stocktransfernumberings/{id}

Updates existing or creates new stock transfer numbering. Result is of type StockTransferNumbering.

Required rights

Authorized user must have assigned StockTransferNumberingCreate or StockTransferNumberingUpdate right.

Path Parameters

Headers

Request Body

{
    "id": "59919dd9c5960398d3774164",
    "isActive": true,
    "type": "Invoice",
    "format": "FA-{yyyy}{i4}",
    "repeat": true,
    "numberings":
    [
        {
            "isActive": true,
            "createdAt": "2022-01-01T00:00:00Z",
            "startAt": "2022-01-01T00:00:00Z",
            "period":
            {
                "unit": "Year",
                "amount": 1
            },
            "currentNumber": 12
        },
        {
            "isActive": true,
            "createdAt": "2023-01-16T09:01:55.711Z",
            "startAt": "2023-01-01T00:00:00Z",
            "period":
            {
                "unit": "Year",
                "amount": 1
            },
            "currentNumber": 8
        }
    ],
    "_v": 1
}

Delete stock transfer numbering

DELETE http://{server-address}/stocktransfernumberings/{id}

Required rights

Authorized user must have StockTransferNumberingDelete right assigned.

Path Parameters

Headers

{
    "id": "59919dd9c5960398d3774164",
    "isActive": true,
    "type": "Invoice",
    "format": "FA-{yyyy}{i4}",
    "repeat": true,
    "numberings":
    [
        {
            "isActive": true,
            "createdAt": "2022-01-01T00:00:00Z",
            "startAt": "2022-01-01T00:00:00Z",
            "period":
            {
                "unit": "Year",
                "amount": 1
            },
            "currentNumber": 12
        },
        {
            "isActive": true,
            "createdAt": "2023-01-16T09:01:55.711Z",
            "startAt": "2023-01-01T00:00:00Z",
            "period":
            {
                "unit": "Year",
                "amount": 1
            },
            "currentNumber": 8
        }
    ],
    "_v": 1
}

Last updated