POST
/
v1
/
contracts
/
customerCommits
/
create
Create a commit
curl --request POST \
  --url https://api.metronome.com/v1/contracts/customerCommits/create \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "customer_id": "13117714-3f05-48e5-a6e9-a66093f13b4d",
  "type": "prepaid",
  "name": "My Commit",
  "priority": 100,
  "product_id": "f14d6729-6a44-4b13-9908-9387f1918790",
  "invoice_contract_id": "e57d6929-c2f1-4796-a9a8-63cedefe848d",
  "access_schedule": {
    "credit_type_id": "2714e483-4ff1-48e4-9e25-ac732e8f24f2",
    "schedule_items": [
      {
        "amount": 1000,
        "starting_at": "2020-01-01T00:00:00.000Z",
        "ending_before": "2020-02-01T00:00:00.000Z"
      }
    ]
  },
  "invoice_schedule": {
    "credit_type_id": "2714e483-4ff1-48e4-9e25-ac732e8f24f2",
    "schedule_items": [
      {
        "unit_price": 10000000,
        "quantity": 1,
        "timestamp": "2020-03-01T00:00:00.000Z"
      }
    ],
    "do_not_invoice": false
  }
}'
{
  "data": {
    "id": "6162d87b-e5db-4a33-b7f2-76ce6ead4e85"
  }
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json

Create a commit

The body is of type object.

Response

Success

The response is of type object.