sfgboxapi

<back to all web services

UsersIntendedAdd

The following routes are available for this service:
POST/users_intended
import datetime
import decimal
from marshmallow.fields import *
from servicestack import *
from typing import *
from dataclasses import dataclass, field
from dataclasses_json import dataclass_json, LetterCase, Undefined, config
from enum import Enum, IntEnum


@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class UsersIntendedAddResponse:
    first_name: Optional[str] = None
    last_name: Optional[str] = None
    identification_number: Optional[str] = None
    phone_number: Optional[str] = None
    latitude: float = 0.0
    longitude: float = 0.0
    users_details_id: Optional[int] = None
    response_status: Optional[ResponseStatus] = None


@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class UsersIntendedAdd:
    first_name: Optional[str] = None
    last_name: Optional[str] = None
    identification_number: Optional[str] = None
    phone_number: Optional[str] = None
    latitude: float = 0.0
    longitude: float = 0.0
    users_details_id: Optional[int] = None

Python UsersIntendedAdd DTOs

To override the Content-type in your clients, use the HTTP Accept Header, append the .jsv suffix or ?format=jsv

HTTP + JSV

The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.

POST /users_intended HTTP/1.1 
Host: sfgboxapi.dev.scadsoftware.com 
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length

{
	firstName: String,
	lastName: String,
	identificationNumber: String,
	phoneNumber: String,
	latitude: 0,
	longitude: 0,
	usersDetailsId: 0
}
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length

{
	firstName: String,
	lastName: String,
	identificationNumber: String,
	phoneNumber: String,
	latitude: 0,
	longitude: 0,
	usersDetailsId: 0,
	responseStatus: 
	{
		errorCode: String,
		message: String,
		stackTrace: String,
		errors: 
		[
			{
				errorCode: String,
				fieldName: String,
				message: String,
				meta: 
				{
					String: String
				}
			}
		],
		meta: 
		{
			String: String
		}
	}
}