1. Home
  2. Docs
  3. SWAP – Track &...
  4. API calls
  5. Registration Management

Registration Management

Registration (De)Activation

POST

/api/v1/changereg

IMPLEMENTATION NOTES

This endpoint activates or de-activates existing registration for authorized user only. Tracking codes (or unique serial numbers are required to perform the operation. 

Accepted parameters are either from and to _or_ code_list.

AUTHORIZATION

Authorization is required for this endpoint. Authorization details can be passed as token or user credentials in the REQUEST header.

PARAMETER
Field Type Description

from

 

String Series Start/End number with or without PREFIX eg. TEST10001 or 10001
to String Series End number (inclusive) with or without PREFIX eg. TEST10010 or 10010
code_list Array Individual codes in an array like [“TEST10001”, “TEST10002”, “TEST10008”]
RESPONSE STATUS

Success – 200 HTTP_OK
Failure – 4XX

EXAMPLES
  • Activating 3 codes with mix of with and without PREFIX. Authentication information is passed via user credentials.

curl "http://35.185.117.72:4015//api/v1/update_bulk_activation" \
-X POST \
-d "{ \"code_list\": [\"COLA100000051\", \"COLA100000052\", \"100000053\"], \"isActive\": false}" \
-H "Content-Type: application/json" \
-H "Username: testuser" \
-H "Password: testPass"


{
"message": "Updated 3 records",
"success": true
}
  • Series de-activation with token authorization
 
Content-Type:application/json
Authorization:JWT eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiJrb3VzaGlrIn0.YMzJBIPgEv-Hxfg_HfS9msHIIibmapYj-ayv51Ioh

{
"from": "COLA100000051",
"to": "COLA100000055",
"isActive": false
}
Tags ,

How can we help?