Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Note: This is a work in progress.

This API is used when finally submitting the service request. Some of the service-inventory specific information is submitted to this API.

Important

Requires an API key sent through the http headers.

API

Adds a new service activity using the CRSM cloud Web API.

POST - /api/v1/service-activity

Parameters

Parameter

Description

Type

ServiceActivity

The service activity being added.

Request Body

Sample Request Body

Code Block
languagejson
{
  "serviceRequestId": 0,
  "locationId": "string",
  "placeOfInspection": "string",
  "comment": "string",
  "tonnage": 0,
  "plannedDateTime": "2021-01-01",
  "actualDateTime": "2021-01-01",
  "requestedDateTime": "2021-01-01",
  "siteContactFirstName": "string",
  "siteContactLastName": "string",
  "siteContactEmail": "string",
  "siteContactPhone": "string",
  "serviceActivityType": 1,
  "locationType": 1
}

Returns

200 - OK

Sample Response Body

Code Block
languagejson
{
  "id": 0,
  "serviceRequestId": 0,
  "locationId": "string",
  "placeOfInspection": "string",
  "comment": "string",
  "tonnage": 0,
  "plannedDateTime": "2021-01-01",
  "actualDateTime": "2021-01-01",
  "requestedDateTime": "2021-01-01",
  "siteContactFirstName": "string",
  "siteContactLastName": "string",
  "siteContactEmail": "string",
  "siteContactPhone": "string",
  "status": 0,
  "serviceActivityType": {
    "id": 0,
    "nameEn": "string",
    "nameFr": "string",
    "status": 0
  },
  "locationType": {
    "id": 0,
    "nameEn": "string",
    "nameFr": "string",
    "status": 0
  }
}

400 - Bad Request

Response Body

Unable “Unable to add service activity.

401 - Unauthorized

If the API key isn’t part of the http headers.

Code Block
"An Api key wasn't provided."

If the API key is invalid.

Code Block
"Unauthorized client."