Skip to main content

Update a schedule

PUT 

https://euwest.api.elasticpath.com/v2/subscriptions/schedules/:schedule_uuid

Update a schedule

Request

Path Parameters

    schedule_uuid UUIDrequired

    The unique identifier of the schedule.

Body

    data ScheduleUpdaterequired
    id UUID (string)required

    The unique identifier.

    type SubscriptionScheduleType (string)required

    Possible values: [subscription_schedule]

    attributes ScheduleUpdateAttributesrequired
    external_ref ExternalRefUpdate (string)nullable

    Possible values: <= 2048 characters

    A unique attribute that you could use to contain information from another company system, for example. The maximum length is 2048 characters.

    name stringnullable

    Possible values: >= 3 characters and <= 1024 characters

    The name of the schedule.

    specification string

    Possible values: <= 1024 characters

    A cron-style specification of when the jobs should be created.

    location string

    Possible values: <= 1024 characters

    The location of the time zone that the schedule operates in.

    job ScheduleJob
    job_type JobType (string)required

    Possible values: [billing-run, tax-run, payment-run, import]

    The type of job. One of the following:

    • billing_run - a billing run job.
    • payment_run - a payment run job.
    • tax_run - a tax run job.

Responses

Success. The schedule details are returned.

Schema
    data Schedule
    id UUID (string)

    The unique identifier.

    type SubscriptionScheduleType (string)required

    Possible values: [subscription_schedule]

    attributes ScheduleAttributesrequired
    external_ref ExternalRef (string)

    Possible values: <= 2048 characters

    A unique attribute that you could use to contain information from another company system, for example. The maximum length is 2048 characters.

    name string

    Possible values: >= 3 characters and <= 1024 characters

    The name of the schedule.

    specification stringrequired

    Possible values: <= 1024 characters

    A cron-style specification of when the jobs should be created. See Schedules.

    location stringrequired

    Possible values: <= 1024 characters

    The location of the time zone that the schedule operates in. Subscriptions runs on Coordinated Universal Time (UTC) time and conforms to RFC 3339.

    job ScheduleJobrequired
    job_type JobType (string)required

    Possible values: [billing-run, tax-run, payment-run, import]

    The type of job. One of the following:

    • billing_run - a billing run job.
    • payment_run - a payment run job.
    • tax_run - a tax run job.
    updated_at stringrequired

    The date and time a resource was updated.

    created_at stringrequired

    The date and time a resource was created.

    meta ScheduleMetarequired
    scheduled_for date-time
    owner stringrequired

    The owner of a resource, either store or organization.

    timestamps Timestampsrequired
    updated_at stringrequired

    The date and time a resource was updated.

    created_at stringrequired

    The date and time a resource was created.

Authorization: http

name: BearerTokentype: httpscheme: bearer
curl -L -X PUT 'https://euwest.api.elasticpath.com/v2/subscriptions/schedules/:schedule_uuid' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer <TOKEN>' \
--data-raw '{
"data": {
"id": "00000000-0000-0000-0000-000000000000",
"type": "subscription_schedule",
"attributes": {
"external_ref": "abc123",
"name": "Daily billing run.",
"specification": "30 0 * * *",
"location": "Europe/London",
"job": {
"job_type": "billing-run"
}
}
}
}'
Request Collapse all
Base URL
https://euwest.api.elasticpath.com/v2
Auth
Parameters
— pathrequired
Body
{
  "data": {
    "id": "00000000-0000-0000-0000-000000000000",
    "type": "subscription_schedule",
    "attributes": {
      "external_ref": "abc123",
      "name": "Daily billing run.",
      "specification": "30 0 * * *",
      "location": "Europe/London",
      "job": {
        "job_type": "billing-run"
      }
    }
  }
}
ResponseClear

Click the Send API Request button above and see the response here!