Skip to main content
POST
/
v1
/
contracts
/
getNamedSchedule
Get a contract's named schedule
curl --request POST \
  --url https://api.metronome.com/v1/contracts/getNamedSchedule \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "customer_id": "9b85c1c1-5238-4f2a-a409-61412905e1e1",
  "contract_id": "d7abd0cd-4ae9-4db7-8676-e986a4ebd8dc",
  "schedule_name": "my-schedule",
  "covering_date": "2022-02-15T00:00:00Z"
}'
{
  "data": [
    {
      "starting_at": "2022-02-01T00:00:00Z",
      "ending_before": "2022-03-01T00:00:00Z",
      "value": "my-value"
    }
  ]
}

Authorizations

Authorization
string
header
required

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

Body

application/json

Which customer, contract, schedule name, and date to retrieve.

customer_id
string<uuid>
required

ID of the customer whose named schedule is to be retrieved

contract_id
string<uuid>
required

ID of the contract whose named schedule is to be retrieved

schedule_name
string
required

The identifier for the schedule to be retrieved

covering_date
string<date-time>

If provided, at most one schedule segment will be returned (the one that covers this date). If not provided, all segments will be returned.

Response

200 - application/json

Success

data
object[]
required
I