Skip to content
Developers
Pilot. The API is open to a small number of organisations and may change — every change is in the changelog.

Reference · Taxes

Copy taxes to other sites

POST/v1/sites/{siteId}/taxes/copy

Copies taxes from this site to others, keeping their codes, along with what they depend on. Every target is checked before anything is copied; then each is copied in turn. If one fails, those before it stay copied, and the error says which site failed.

Needs Catalogue: writeChanges live data

Path

  • siteIdrequired

    The site, from GET /v1/sites.

    string

Headers

  • Authorizationrequired

    An API key from Automation > Access in the Dnero portal, sent as Authorization: Bearer <key>.

    string

  • Idempotency-Key

    A value you choose, unique to what this request creates: a UUID, or your own id for it. Sending it again with the same body returns the first response and creates nothing more. Required.

    string · at most 255 characters

Body

  • codesrequired

    The records to copy, by code at this site.

    array of string · at least 1 · at most 500

  • targetSiteIdsrequired

    The sites to copy to. The key needs write access to the catalogue at each.

    array of string · at least 1 · at most 50

  • overwriteExisting

    Replace a record a target site already has under the same code. Defaults to true; false copies only what is missing.

    boolean

Responses

200 OK

  • targetsrequired

    Each target site, in the order given.

    array of objects

    3 fields in each
    • changedrequired

      How many records were created or replaced there, including any the copied records need, such as their category.

      integer

    • namerequired

      The target site's name.

      string

    • siteIdrequired

      The target site.

      string