MasStock Squad — mas_stock@masmovil.com
| Resource | Description |
|---|---|
| Stock Reservations | Operations with stock reservations for retailers |
MasStock Squad — mas_stock@masmovil.com
| Resource | Description |
|---|---|
| Stock Reservations | Operations with stock reservations for retailers |
Creates a new reservation for a device
PATH PARAMETERS
Organization name as it is registered in mas-stack
Reservation request with device details
{
"device_id": "DEVICE123456",
"dealer_id": "DEALER001",
"is_sim": true
} | Property | Type | Description | Constraints | Default |
|---|---|---|---|---|
device_id
*
| string | Device identifier | ||
dealer_id
*
| string | Dealer identifier | ||
is_sim
*
| boolean | Indicates if the reservation is for a SIM card |
OK Success
{
"reservation_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
} | Property | Type | Description | Constraints | Default |
|---|---|---|---|---|
reservation_id | string (uuid) | Generated reservation identifier in UUID format |
Bad Request Bad Request - Missing mandatory fields, validation error, or device validation failure
{
"code": "VALIDATION_ERROR",
"message": "dealer_id is required",
"details": null
} | Property | Type | Description | Constraints | Default |
|---|---|---|---|---|
code | string | |||
message | string | |||
details | string | Additional error details |
Not Found Not Found - Device not found in external systems
{
"code": "NOT_FOUND",
"message": "device_id not found",
"details": null
} | Property | Type | Description | Constraints | Default |
|---|---|---|---|---|
code | string | |||
message | string | |||
details | string | Additional error details |
Conflict Conflict - Reservation already exists for this device with CREATED status
{
"code": "RESERVATION_CONFLICT",
"message": "Reservation already exists for device DEVICE123 with status CREATED, created by dealer DEALER001",
"device_id": "DEVICE123",
"dealer_id": "DEALER001",
"status": "CREATED"
} | Property | Type | Description | Constraints | Default |
|---|---|---|---|---|
code | string | |||
message | string | |||
reservation_id | string (uuid) | Existing reservation identifier | ||
device_id | string | Device identifier that has the conflict | ||
dealer_id | string | Dealer who created the existing reservation | ||
status | string
()
CREATEDCANCELLEDFINALIZED | Current status of the existing reservation |
Internal Server Error Internal Server Error
{
"code": "INTERNAL_ERROR",
"message": "Internal server error",
"details": null
} | Property | Type | Description | Constraints | Default |
|---|---|---|---|---|
code | string | |||
message | string | |||
details | string | Additional error details |
Service Unavailable Service Unavailable - Database persistence error
{
"code": "DATABASE_ERROR",
"message": "Unable to persist reservation data",
"details": "The reservation could not be saved to the database. Please try again later."
} | Property | Type | Description | Constraints | Default |
|---|---|---|---|---|
code | string | |||
message | string | |||
details | string | Additional error details |
curl -X POST 'http://localhost:8080/v1/orgs/yoigo/reservation' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
--data-raw '{
"device_id": "DEVICE123456",
"dealer_id": "DEALER001",
"is_sim": true
}' Cancels an existing reservation by its ID. Validates that the dealer requesting cancellation matches the dealer who created the reservation.
PATH PARAMETERS
Organization name as it is registered in mas-stack
Reservation identifier
Cancellation request with dealer information
{
"dealer": "DEALER001"
} | Property | Type | Description | Constraints | Default |
|---|---|---|---|---|
dealer
*
| string | Dealer identifier requesting the cancellation |
OK Success - Reservation cancelled successfully
Bad Request Bad Request - Dealer cannot cancel reservation created by another dealer
{
"code": "DEALER_MISMATCH",
"message": "Dealer DEALER002 cannot cancel reservation created by dealer DEALER001",
"details": null
} | Property | Type | Description | Constraints | Default |
|---|---|---|---|---|
code | string | |||
message | string | |||
details | string | Additional error details |
Not Found Not Found - Reservation not found
{
"code": "RESERVATION_NOT_FOUND",
"message": "Reservation with ID a1b2c3d4-e5f6-7890-abcd-ef1234567890 not found",
"details": null
} | Property | Type | Description | Constraints | Default |
|---|---|---|---|---|
code | string | |||
message | string | |||
details | string | Additional error details |
Internal Server Error Internal Server Error
{
"code": "INTERNAL_ERROR",
"message": "Internal server error",
"details": null
} | Property | Type | Description | Constraints | Default |
|---|---|---|---|---|
code | string | |||
message | string | |||
details | string | Additional error details |
curl -X POST 'http://localhost:8080/v1/orgs/yoigo/reservation/a1b2c3d4-e5f6-7890-abcd-ef1234567890/cancellation' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
--data-raw '{
"dealer": "DEALER001"
}' Retrieves device information by identifier
PATH PARAMETERS
Organization name as it is registered in mas-stack
QUERY PARAMETERS
Device identifier
OK Success - Device information retrieved
{
"reference": "REF123456",
"mac": "00:1A:2B:3C:4D:5E"
} | Property | Type | Description | Constraints | Default |
|---|---|---|---|---|
reference
*
| string | Device reference | ||
mac | string | MAC address (optional) |
Not Found Not Found - Device not found
{
"code": "DEVICE_NOT_FOUND",
"message": "Device with identifier DEVICE123456 not found",
"details": null
} | Property | Type | Description | Constraints | Default |
|---|---|---|---|---|
code | string | |||
message | string | |||
details | string | Additional error details |
Internal Server Error Internal Server Error
{
"code": "INTERNAL_ERROR",
"message": "Internal server error",
"details": null
} | Property | Type | Description | Constraints | Default |
|---|---|---|---|---|
code | string | |||
message | string | |||
details | string | Additional error details |
curl -X GET 'http://localhost:8080/v1/orgs/yoigo/device?identifier=DEVICE123456' \
-H 'Accept: application/json'