Apply Documents for DIDs (Text/Image)
Transfer ID Image
This API endpoint is used to transfer user identification details along with an image file.
Endpoint
http://newapi.didx.net/DidxApis/api/TransferIDImage.php?UserID=value&Pass=value&DIDNumber=value&UserInfo=value&ImageFile=value&NotifyURL=value&CustomerName=value&CustomerAddress=value&
ContactPhone=value&Email=value&DocumentID=value&DocumentType=value&DocumentDetail=value&UserData=value
Method
GET
URL Parameters
UserID
: User’s unique identifierPass
: User’s passwordDIDNumber
: User’s DID numberUserInfo
: Additional information about the userImageFile
: Path or URL of the image fileNotifyURL
: URL to which notifications will be sentCustomerName
: User’s nameCustomerAddress
: User’s addressContactPhone
: User’s contact numberEmail
: User’s email addressDocumentID
: Document’s unique identifierDocumentType
: Type of documentDocumentDetail
: Details of the documentUserData
: Additional user data
Returns
Outputs the return value of the method TransferIDImage
.
Input Fields
- $UserID: User’s unique identifier
- $Pass: User’s password
- $DIDNumber: DID Number (Direct Inward Dialing number)
- $UserInfo: Array containing various user information
- $ImageFile: Base64 encoded image file to be transferred
- $NotifyURL: URL to which notifications will be sent
Returned Fields
The function returns a string indicating the status of the operation:
- “-1”: No match for USER and PASSWORD combination
- “-2”: User is either deleted or inactive
- “-3”: Type of customer is 1
- “-8”: Document status in CusDocs is 0
- “-9”: Document status in CusDocs is 1
- “-10”: DidNumber status is 2 and BOID doesn’t match with UserID
- “-11”: DIDNumber status is 1
- “-13”: Unable to upload file on S3 server
- “-5”: Function reaches the end without executing completely
- “1”: Operation was successful
Error Codes
The function might return the following error codes:
- -1: There are no rows matching the passed userID and Password.
- -2: If the User is either deleted or not active.
- -3: When the Customer type is 1.
- -8: If the document’s status is 0.
- -9: If the document’s status is 1.
- -10: If the DIDNumber status is 2 and BOID doesn’t match with UserID.
- -11: If the DIDNumber status is 1.
- -13: Unable to upload file on S3 server.
- -5: Function reaches the end without executing completely.
Note: The error codes are returned as strings. In each case, the function ends and returns the error code.
The function finally returns “1” when everything executes successfully, or “-5” if the function reaches the end without executing completely.
Transfer ID Text
This API endpoint is used to transfer user identification details without an image file.
Endpoint
http://newapi.didx.net/DidxApis/api/TransferIDText.php?UserID=value&Pass=value&DIDNumber=value&UserInfo=value&NotifyURL=value&CustomerName=value&CustomerAddress=value&ContactPhone=value&
Email=value&DocumentID=value&DocumentType=value&DocumentDetail=value&UserData=value
Method
GET
URL Parameters
UserID
: User’s unique identifierPass
: User’s passwordDIDNumber
: User’s DID numberUserInfo
: Additional information about the userNotifyURL
: URL to which notifications will be sentCustomerName
: User’s nameCustomerAddress
: User’s addressContactPhone
: User’s phone numberEmail
: User’s email addressDocumentID
: Document’s unique identifierDocumentType
: Type of documentDocumentDetail
: Details of the documentUserData
: Additional user data
Returns
Outputs the return value of the method TransferIDText
.
Example Usage
Using curl:
curl -G \
'https://yourdomain.com/api_path' \
-d 'UserID=123' \
-d 'Pass=abc' \
-d 'DIDNumber=112233' \
-d 'UserInfo=some_info' \
-d 'ImageFile=/path/to/file.jpg' \
-d 'NotifyURL=https://notify.me/here' \
-d 'CustomerName=John Doe' \
-d 'CustomerAddress=123 Street, City, Country' \
-d 'ContactPhone=+11234567890' \
-d 'Email=johndoe@email.com' \
-d 'DocumentID=doc123' \
-d 'DocumentType=type1' \
-d 'DocumentDetail=details' \
-d 'UserData=some_data'
Input Fields
- $UserID: User’s unique identifier
- $Pass: User’s password
- $DIDNumber: DID (Direct Inward Dialing number)
- $UserInfo: Additional information about the user
- $NotifyURL: URL to which notifications will be sent
$UserInfo is an array containing:
- Customer Name: User’s name
- Customer Address: User’s address
- Contact Phone: User’s phone number
- Email: User’s email address
- Document ID: Document’s unique identifier
- Document Type: Type of document
- Document Detail: Details of the document
- User Data (50B): Additional user data
Returned Fields
The function returns a string with one of the following values, indicating the status of the operation:
- “-1”: No match for USER and PASSWORD combination
- “-2”: User is either inactive or deleted
- “-3”: Incorrect Customer type
- “-5”: Unknown error occurred
- “-8”: Document Status in CusDocs is 0
- “-9”: Document Status in CusDocs is 1
- “-10”: Conflict in assigned DIDNumber and BOID
- “-11”: The Status in DIDS is 1
- “1”: Operation was successful
Error Codes
Error codes returned might include:
- -1: There are no rows matching the passed userID and Password.
- -2: If the User is either deleted or not active.
- -3: When the Customer type is 1.
- -5: If DIDNumber does not exist.
- -8: If the document’s status is 0.
- -9: If the document’s status is 1.
- -10: If the DIDNumber status is 2 and BOID doesn’t match with UserID.
- -11: If the DIDNumber status is 1.
Please note: The error codes are returned as strings. In each case, the function ends and returns the error code.
The function finally returns “1” when everything executes successfully, or “-5” if the function reaches the end without executing completely.