Services

class sp_api.api.Services(marketplace: Marketplaces = Marketplaces.US, *, refresh_token=None, account='default', credentials=None, restricted_data_token=None, proxies=None, verify=True, timeout=None, version=None, credential_providers=None)

Services SP-API Client :link:

With the Services API, you can build applications that help service providers get and modify their service orders.

get_service_job_by_service_job_id(self, serviceJobId, **kwargs) ApiResponse

Gets service job details for the service job indicated by the service job identifier you specify.

Usage Plan:

Rate (requests per second)

Burst

20

40

For more information, see “Usage Plans and Rate Limits” in the Selling Partner API documentation.

Parameters:

serviceJobId – string | * REQUIRED A service job identifier.

Return type:

ApiResponse

cancel_service_job_by_service_job_id(self, serviceJobId, **kwargs) ApiResponse

Cancels the service job indicated by the service job identifier you specify.

Usage Plan:

Rate (requests per second)

Burst

5

20

For more information, see “Usage Plans and Rate Limits” in the Selling Partner API documentation.

Parameters:
  • serviceJobId – string | * REQUIRED An Amazon defined service job identifier.

  • cancellationReasonCode (key) – string | * REQUIRED A cancel reason code that specifies the reason for cancelling a service job.

Return type:

ApiResponse

complete_service_job_by_service_job_id(self, serviceJobId, **kwargs) ApiResponse

Completes the service job indicated by the service job identifier you specify.

Usage Plan:

Rate (requests per second)

Burst

5

20

For more information, see “Usage Plans and Rate Limits” in the Selling Partner API documentation.

Parameters:

serviceJobId – string | * REQUIRED An Amazon defined service job identifier.

Return type:

ApiResponse

get_service_jobs(self, **kwargs) ApiResponse

Gets service job details for the specified filter query.

Usage Plan:

Rate (requests per second)

Burst

10

40

For more information, see “Usage Plans and Rate Limits” in the Selling Partner API documentation.

Parameters:
  • serviceOrderIds (key) – array | List of service order ids for the query you want to perform.Max values supported 20.

  • serviceJobStatus (key) – array | A list of one or more job status by which to filter the list of jobs.

  • pageToken (key) – string | String returned in the response of your previous request.

  • pageSize (key) – integer | A non-negative integer that indicates the maximum number of jobs to return in the list, Value must be 1 - 20. Default 20.

  • sortField (key) – string | Sort fields on which you want to sort the output.

  • sortOrder (key) – string | Sort order for the query you want to perform.

  • createdAfter (key) – string | A date used for selecting jobs created after (or at) a specified time must be in ISO 8601 format. Required if LastUpdatedAfter is not specified.Specifying both CreatedAfter and LastUpdatedAfter returns an error.

  • createdBefore (key) – string | A date used for selecting jobs created before (or at) a specified time must be in ISO 8601 format.

  • lastUpdatedAfter (key) – string | A date used for selecting jobs updated after (or at) a specified time must be in ISO 8601 format. Required if createdAfter is not specified.Specifying both CreatedAfter and LastUpdatedAfter returns an error.

  • lastUpdatedBefore (key) – string | A date used for selecting jobs updated before (or at) a specified time must be in ISO 8601 format.

  • scheduleStartDate (key) – string | A date used for filtering jobs schedule after (or at) a specified time must be in ISO 8601 format. schedule end date should not be earlier than schedule start date.

  • scheduleEndDate (key) – string | A date used for filtering jobs schedule before (or at) a specified time must be in ISO 8601 format. schedule end date should not be earlier than schedule start date.

  • marketplaceIds (key) – array | * REQUIRED Used to select jobs that were placed in the specified marketplaces.

Return type:

ApiResponse

add_appointment_for_service_job_by_service_job_id(self, serviceJobId, **kwargs) ApiResponse

Adds an appointment to the service job indicated by the service job identifier you specify.

Usage Plan:

Rate (requests per second)

Burst

5

20

For more information, see “Usage Plans and Rate Limits” in the Selling Partner API documentation.

Parameters:
  • serviceJobId – string | * REQUIRED An Amazon defined service job identifier.

  • body

    { “appointmentTime”: {

    ”startTime”: “2019-08-24T14:15:22Z”, “durationInMinutes”: 0

    }

  • }

    Returns:

    ApiResponse:

reschedule_appointment_for_service_job_by_service_job_id(self, serviceJobId, **kwargs) ApiResponse

Reschedules an appointment for the service job indicated by the service job identifier you specify.

Usage Plan:

Rate (requests per second)

Burst

5

20

For more information, see “Usage Plans and Rate Limits” in the Selling Partner API documentation.

Parameters:
  • serviceJobId – string | * REQUIRED An Amazon defined service job identifier.

  • appointmentId – string | * REQUIRED An existing appointment identifier for the Service Job.

  • kwargs

    Example | >>> {

    ”appointmentTime”: {

    “startTime”: “2019-08-24T14:15:22Z”, “durationInMinutes”: 0

    }, “rescheduleReasonCode”: “string”

    }

Return type:

ApiResponse