Examples

PATCH /api/v2/premium-service-requests/11
{
  "data": {
    "id": "11",
    "type": "premium-service-requests",
    "attributes": {
      "title": "A new title",
      "description": null,
      "time-required": null,
      "smarts-required": null,
      "status": "submitted",
      "status-updated-at": "2018-01-24 09:59:29 +0800",
      "completed-at": null,
      "deliver-at": null,
      "updated-at": "2018-01-24 09:59:29 +0800",
      "rating": null,
      "feedback": null
    }
  }
}
400
{
  "errors": [
    {
      "title": "Param not allowed",
      "detail": "title is not allowed.",
      "code": "105",
      "status": "400"
    },
    {
      "title": "Param not allowed",
      "detail": "description is not allowed.",
      "code": "105",
      "status": "400"
    },
    {
      "title": "Param not allowed",
      "detail": "smarts-required is not allowed.",
      "code": "105",
      "status": "400"
    },
    {
      "title": "Param not allowed",
      "detail": "rating is not allowed.",
      "code": "105",
      "status": "400"
    },
    {
      "title": "Param not allowed",
      "detail": "feedback is not allowed.",
      "code": "105",
      "status": "400"
    }
  ]
}

Params

Param name Description
id
required

Premium Service Request ID

Validations:

  • Must be an identifier, string from 1 to 128 characters containing only alphanumeric characters, space, underscore(_), hyphen(-) with no leading or trailing space.

data
required

Premium Service Request information

Validations:

  • Must be a Hash

data[type]
optional

Validations:

data[attributes]
optional

Validations:

  • Must be a Hash

data[attributes][title]
optional

Title of the request

Validations:

  • Must be a String

data[attributes][description]
optional , nil allowed

Short description of the request

Validations:

  • Must be a String

data[attributes][time_required]
optional , nil allowed

Time required to finish the request

Validations:

  • Must be a Integer

data[attributes][note]
optional , nil allowed

Notes related to the request

Validations:

  • Must be a String

data[attributes][smarts_required]
optional , nil allowed

Smarts required to fulfill the request

Validations:

  • Must be a Integer

data[attributes][status]
optional

Status of the request

Validations:

  • Must be a String

data[relationships]
optional

Validations:

  • Must be a Hash

data[relationships][requestee]
optional

Validations:

  • Must be a Hash

data[relationships][requestee][data]
optional

Validations:

  • Must be a Hash

data[relationships][requestee][data][type]
optional

Should be `Account`

Validations:

  • Must be a String

data[relationships][requestee][data][id]
optional

Account ID

Validations:

  • Must be an identifier, string from 1 to 128 characters containing only alphanumeric characters, space, underscore(_), hyphen(-) with no leading or trailing space.

data[relationships][premium_service]
optional

Validations:

  • Must be a Hash

data[relationships][premium_service][data]
optional

Validations:

  • Must be a Hash

data[relationships][premium_service][data][type]
optional

Should be `PremiumService`

Validations:

  • Must be a String

data[relationships][premium_service][data][id]
optional

PremiumService ID

Validations:

  • Must be an identifier, string from 1 to 128 characters containing only alphanumeric characters, space, underscore(_), hyphen(-) with no leading or trailing space.

data[relationships][premium_service_attachments]
optional , nil allowed

Validations:

  • Must be an Array of nested elements

data[relationships][premium_service_attachments][data]
optional

Validations:

  • Must be a Hash

data[relationships][premium_service_attachments][data][type]
optional

Should be `PremiumServiceAttachment`

Validations:

  • Must be a String

data[relationships][premium_service_attachments][data][id]
optional

PremiumServiceAttachment ID

Validations:

  • Must be an identifier, string from 1 to 128 characters containing only alphanumeric characters, space, underscore(_), hyphen(-) with no leading or trailing space.