DELETE api/v1/Users/{id}/UserCards/{cardId}

Removes a Card from an existing User. Returns Success/Error code.

Request Information

URI Parameters

NameDescriptionTypeAdditional information
id

User Id

globally unique identifier

Required

cardId

Card Id

globally unique identifier

None.

Body Parameters

RemoveUserCardViewModel
NameDescriptionTypeAdditional information
UserId

Required: The PK of the existing User that you want to remove the card from.

globally unique identifier

None.

CardId

Optional: The PK of the existing Card that you want to remove from the User. Retrieve by calling Person/GetUserById

globally unique identifier

None.

ExternalCardNumber

Conditional: If CardId is null, then this must be the External number imprinted on the card you wish to remove. If this card does not belong to the same User provided in UserId, then a NotFound error code will be returned.

string

None.

InternalCardNumber

Conditional: If CardId is null, then this must be the Blub0x Internal card number. If this card does not belong to the same User provided in UserId, then a NotFound error code will be returned.

integer

None.

Request Formats

application/json, text/json

Sample:
{
  "UserId": "b2e05f29-a56d-4464-9ae5-70d69d38ca6e",
  "CardId": "e759c06b-1bde-4d1a-8235-362b40bea347",
  "ExternalCardNumber": "sample string 2",
  "InternalCardNumber": 1
}

application/xml, text/xml

Sample:
<RemoveUserCardViewModel xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/APIWebRole.Controllers">
  <CardId>e759c06b-1bde-4d1a-8235-362b40bea347</CardId>
  <ExternalCardNumber>sample string 2</ExternalCardNumber>
  <InternalCardNumber>1</InternalCardNumber>
  <UserId>b2e05f29-a56d-4464-9ae5-70d69d38ca6e</UserId>
</RemoveUserCardViewModel>

application/x-www-form-urlencoded

Sample:

Sample not available.

Response Information

Resource Description

Result
NameDescriptionTypeAdditional information
ResultCode

Represents the result code

integer

None.

Description

Represents a description of the result code

string

None.

Response Formats

application/json, text/json

Sample:
{
  "ResultCode": 1,
  "Description": "sample string 2"
}

application/xml, text/xml

Sample:
<Result xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/APIWebRole.Controllers">
  <Description>sample string 2</Description>
  <HttpStatusCode>Continue</HttpStatusCode>
  <ResultCode>1</ResultCode>
</Result>