Exercise 1: Creating a Rate Table

Authorization: administration token

Endpoint information: Create a rate table 

In this step, you use the /rate-tables endpoint to create a simple rate table. The rate table series is PublicationApps and it specifies the rates for the following products:

Product

Version

Rate

PhotoPrint

1.0

3

SignPrint

1.0

4

CADPrint

2.0

7

Send a POST request to the /provisioning/api/v1.0/rate-tables endpoint to create a rate table. Use the values as described in the following table:

Create a Rate Table

Item

Description

URI

/provisioning/api/v1.0/rate-tables 

Method

POST 

Query parameters

N/A 

Request body

{

  "effectiveFrom": 1698849852000,

  "series": "PublicationApps",

  "version": "1",

  "items": [

    {

      "name": "PhotoPrint",

      "version": "1.0",

      "rate": 3

    },

    {

      "name": "SignPrint",

      "version": "1.0",

      "rate": 4

    },

    {

      "name": "CADPrint",

      "version": "2.0",

      "rate": 7

    }

  ]

}

Sample Response

If the rate table has been created (status 201), a message indicates the successful outcome:

{

    "message": "Rate table successfully saved"

}

Tip:To see the rate table that you created, send a GET call to /provisioning/api/v1.0/rate-tables.

See also