Services๏
- class sp_api.api.Services(marketplace: ~sp_api.base.marketplaces.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, auth_token_client_class=<class 'sp_api.auth.access_token_client.AccessTokenClient'>)๏
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:
- 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:
- 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:
- 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:
- 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: