New Introducing inventory in LightInventory in Light Read the announcementRead more

Create number series

POST
https://api.light.inc/v1/number-series

Creates a number series for self-billed bills. Assign it to a vendor through the vendor's defaultSelfBilledNumberSeriesId. Send the same request with the same X-Idempotency-Key within 24 hours to get back the series the first call created.

Permissions checked: vendors:create and vendors:update. What a call needs depends on the caller, the record and the request.

Authorization

Send one of these on every request. See Authentication for how to get credentials.

  • API key

    Basic authentication header of the form Basic <api_key>, where <api_key> is your api key.

  • Bearer token

Headers

  • X-Idempotency-Key string

Request body

application/json;charset=UTF-8

  • name string

    Name of the number series, unique in the company.

  • prefix string

    Text put before the number, such as EES-. Can be empty.

  • suffix string

    Text put after the number. Leave it out when the series has none; an empty text is refused.

  • padding integer · int32

    Number of digits the number is padded to with leading zeros, from 1 to 10.

  • nextNumber integer · int64

    The number the first self-billed bill that uses this series gets, from 1 to 999999999999999.

Response

  • id string · uuid

    Unique identifier of the number series.

  • name string

    Name of the number series, unique in the company.

  • prefix string

    Text put before the number, such as EES-.

  • suffix string

    Text put after the number. Null when the series has none.

  • padding integer · int32

    Number of digits the number is padded to with leading zeros. A longer number is not cut.

  • nextNumber integer · int64

    The number the next self-billed bill that uses this series gets.

  • nextNumberPreview string

    The next number with its prefix, padding and suffix, such as EES-0083.

  • status string

    ACTIVE series can be assigned to vendors and bills. ARCHIVED series can't, but still number the bills and vendors that already use them.

    ⚠️ This enum is not exhaustive; new values may be added in the future.

    One of ACTIVE ARCHIVED

  • createdAt string · date-time

    Timestamp when the number series was created.