Back to top

SunPlusXtra API

This documentation corresponds to the definition of the methods available to connect to SunPlusXtra.

Note: The following details the available methods with their parameters and corresponding examples.

Access

Access permission

Access permission
POST/login

Parameters Type Required Description
userid string yes SunPlusXtra System User
password string yes SunPlusXtra User Password
email string yes User’s institutional email to whom communication will be maintained

Example URI

POST https://gateway.iadnet.org/api/spxtra/login
Request
HideShow
Headers
Content-Type: application/json
Accept: application/json
API-Key: Bearer 7867a1f5fb24c30d95227c77829a6cc8807062c86f4f406914b258adab78a498
Body
{
  "userid": "SPX_USER",
  "password": "SPX_PASSWORD",
  "email": "EMAIL_USER"
}
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "message": "Access granted",
  "access_token": "7867a1f5fb24c30d95227c77829a6cc8807062c86f4f406914b258adab78a498",
  "token_type": "Bearer"
}
Response  221
HideShow
Headers
Content-Type: application/json
Body
{
  "message": "SPX user not found",
  "error": true
}

SunPlusXtra API

The token obtained in the /login request should be placed in the header of each subsequent method.

Below is an example:

Authorization: bearer 5262d64b892e8d4341000001

Company data

Communication with company information

Company data
GET/company

The basic information of the company and its tax details is obtained, such as Business Name and Address.

## No parameters

Table codes, Error code list

Code Description
202 Error in the data obtained
203 Error in the data obtained

Example URI

GET https://gateway.iadnet.org/api/spxtra/company
Request
HideShow
Headers
Content-Type: application/json
Accept: application/json
Authorization: bearer {{TOKEN_OBTAINED_FROM_LOGIN}}
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
    "message": "Correct query",
    "response": {
        "id": 5,
        "name": "IAN Iglesia Adventista Nacional",
        "rfc": "IAS930628FA8",
        "businessName": "INDISTRIA ILUMINADORA DE ALMACENES",
        "address": "UXMAL 431",
    }
}
Response  220
HideShow

If the token is expired or invalid

Headers
Content-Type: application/json
Body
{
  "message": "Incorrect authentication",
  "error": true
}
Response  221
HideShow

If the user with which the token was registered is no longer active in SunPlusXtra

Headers
Content-Type: application/json
Body
{
  "message": "SPX user not found",
  "error": true
}
Response  201
HideShow

Other error messages defined in the table codes

Headers
Content-Type: application/json
Body
{
  "message": "Incorrect query",
  "description": "ERROR_MESSAGE",
  "code": "ERROR_CODE",
  "error": true
}

Notifications or Notices to the company

Communication with notifications or notices between companies

Notifications or Notices to the company
GET/notificatios/{period}/{onlyPending}/{canceled}

The basic information of the company is obtained.

Table status

Status Description
1 Pending
4 Rejected
6 Accounted for

Table codes, Error code list

Code Description
202 Error in the data obtained
203 Error in the data obtained
206 The parameters sent are invalid

Example URI

GET https://gateway.iadnet.org/api/spxtra/notificatios/2022007/1/0
URI Parameters
HideShow
period
string (required) Example: 2022007

Parameter to indicate the period

onlyPending
string (required) Example: 1

If only the pending notifications are required, you should send the value 1

canceled
string (required) Example: 0

To obtain only the canceled notifications, you should send the value 1

Request
HideShow
Headers
Content-Type: application/json
Accept: application/json
Authorization: bearer {{TOKEN_OBTAINED_FROM_LOGIN}}
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "message": "Correct query",
  "response": [
    {
      "id": 29,
      "policyId": 751908,
      "journalNo": 9993,
      "policyDetailId": 4999598,
      "originCompany": "W11 - Unión Sureste",
      "originCompanyId": 97,
      "transaction": "Crédito",
      "destinationCompany": "IAN Iglesia Adventista Nacional",
      "amount": "18630.00",
      "originAccount": null,
      "destinationAccount": null,
      "rejectionReason": null,
      "statusId": 1,
      "line": 2,
      "period": "2022007",
      "journal": null,
      "policyDetail": null,
      "accountingPolicyId": null
    },
    {
      "id": 30,
      "policyId": 752159,
      "journalNo": 9996,
      "policyDetailId": 5001604,
      "originCompany": "W11 - Unión Sureste",
      "originCompanyId": 97,
      "transaction": "Crédito",
      "destinationCompany": "IAN Iglesia Adventista Nacional",
      "amount": "7695.00",
      "originAccount": null,
      "destinationAccount": null,
      "rejectionReason": null,
      "statusId": 1,
      "line": 9,
      "period": "2022007",
      "journal": null,
      "policyDetail": null,
      "accountingPolicyId": null
    }
  ]
}
Response  220
HideShow

If the token is expired or invalid

Headers
Content-Type: application/json
Body
{
  "message": "Incorrect authentication",
  "error": true
}
Response  221
HideShow

If the user with which the token was registered is no longer active in SunPlusXtra

Headers
Content-Type: application/json
Body
{
  "message": "SPX user not found",
  "error": true
}
Response  201
HideShow

Other error messages defined in the table codes

Headers
Content-Type: application/json
Body
{
  "message": "Incorrect query",
  "description": "ERROR_MESSAGE",
  "code": "ERROR_CODE",
  "error": true
}

Student Data

Resources available to obtain the list of students

Student Data
GET/data-student{?search}

Method to obtain student data.

Table codes, Error code list

Code Description
201 Error in the data obtained
202 Error in the query, invalid parameters

Example URI

GET https://gateway.iadnet.org/api/spxtra/data-student?search=ERALCJO01
URI Parameters
HideShow
search
string (required) Example: ERALCJO01

Parameter to perform the search query or filter

Request
HideShow
Headers
Content-Type: application/json
Accept: application/json
Authorization: bearer {{TOKEN_OBTAINED_FROM_LOGIN}}
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "message": "Correct query",
  "response": [
    {
      "enrollment": "ERALCJO01",
      "curp": "ROAR801109HYNSLN08",
      "rvoe": "343533434",
      "educationLevel": "Preschool"
    }
  ]
}
Response  220
HideShow

If the token is expired or invalid

Headers
Content-Type: application/json
Body
{
  "message": "Incorrect authentication",
  "error": true
}
Response  221
HideShow

If the user with which the token was registered is no longer active in SunPlusXtra

Headers
Content-Type: application/json
Body
{
  "message": "SPX user not found",
  "error": true
}
Response  201
HideShow

Other error messages defined in the table codes

Headers
Content-Type: application/json
Body
{
  "message": "Incorrect query",
  "description": "ERROR_MESSAGE",
  "code": "ERROR_CODE",
  "error": true
}

Account Balance

Resources available to obtain the balance of an account

Account Balance
GET/account-balance{?accountCode,period}

Method to obtain the balance of an account.

Table codes, Error code list

Code Description
202 Error in the data obtained
203 Error data not found, according to the information provided
206 Error of information received, incorrect data

Example URI

GET https://gateway.iadnet.org/api/spxtra/account-balance?accountCode=101110&period=2023001
URI Parameters
HideShow
accountCode
string (required) Example: 101110

Parameter to indicate the account code

period
string (required) Example: 2023001

Parameter to indicate the period

Request
HideShow
Headers
Content-Type: application/json
Accept: application/json
Authorization: bearer {{TOKEN_OBTAINED_FROM_LOGIN}}
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "message": "Correct query",
  "response": {
    "account": "101110",
    "balance": "12332"
  }
}
Response  220
HideShow

If the token is expired or invalid

Headers
Content-Type: application/json
Body
{
  "message": "Incorrect authentication",
  "error": true
}
Response  221
HideShow

If the user with which the token was registered is no longer active in SunPlusXtra

Headers
Content-Type: application/json
Body
{
  "message": "SPX user not found",
  "error": true
}
Response  201
HideShow

Other error messages defined in the table codes

Headers
Content-Type: application/json
Body
{
  "message": "Incorrect query",
  "description": "ERROR_MESSAGE",
  "code": "ERROR_CODE",
  "error": true
}

List of Accounts

Resources available to obtain the list of accounts filtered by parameters

List of Accounts
GET/account-list{?part,code}

Method to obtain the list of accounts, including the required dimensions.

Table codes, Error code list

Code Description
202 Error in the data obtained
203 Error data not found, according to the information provided
206 Error of information received, incorrect data

Example URI

GET https://gateway.iadnet.org/api/spxtra/account-list?part=101110&code=1
URI Parameters
HideShow
part
string (required) Example: 101110

Parameter to specify the account code to query or the name text

code
string (required) Example: 1

Parameter to indicate whether the search will be exclusively by code

Request
HideShow
Headers
Content-Type: application/json
Accept: application/json
Authorization: bearer {{TOKEN_OBTAINED_FROM_LOGIN}}
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "message": "Correct query",
  "response": [
    {
      "accountType": 4,
      "allocationInProgress": 99,
      "balanceType": 0,
      "code": "101110",
      "currency": "MXP1 ",
      "drcr": null,
      "enterA1": 2,
      "enterA10": 2,
      "enterA2": 1,
      "enterA3": 1,
      "enterA4": 2,
      "enterA5": 2,
      "enterA6": 2,
      "enterA7": 2,
      "enterA8": 2,
      "enterA9": 2,
      "id": "101110         ",
      "longDescr": null,
      "lookup": "GENERAL CASH   ",
      "name": "General Cash",
      "shortHead": "General Cash",
      "status": 0,
      "updateCount": null
    },
    {
      "accountType": 4,
      "allocationInProgress": 99,
      "balanceType": 0,
      "code": "101110 NF",
      "currency": "MXP1 ",
      "drcr": null,
      "enterA1": 2,
      "enterA10": 2,
      "enterA2": 1,
      "enterA3": 1,
      "enterA4": 2,
      "enterA5": 2,
      "enterA6": 2,
      "enterA7": 2,
      "enterA8": 2,
      "enterA9": 2,
      "id": "101110 NF      ",
      "longDescr": null,
      "lookup": "GENERAL CASH NO",
      "name": "Non-Fiscal General Cash",
      "shortHead": "General Cash No",
      "status": 0,
      "updateCount": null
    }
  ]
}
Response  220
HideShow

If the token is expired or invalid

Headers
Content-Type: application/json
Body
{
  "message": "Incorrect authentication",
  "error": true
}
Response  221
HideShow

If the user with which the token was registered is no longer active in SunPlusXtra

Headers
Content-Type: application/json
Body
{
  "message": "SPX user not found",
  "error": true
}
Response  201
HideShow

Other error messages defined in the table codes

Headers
Content-Type: application/json
Body
{
  "message": "Incorrect query",
  "description": "ERROR_MESSAGE",
  "code": "ERROR_CODE",
  "error": true
}

DIMENSIONS

Resources available to obtain the list of accounts filtered by parameters

List Dimensions
GET/dimension{?catID}

Method to obtain the list of dimensions filtered by dimension catID

Table codes, Error code list

Code Description
202 Error in the data obtained
203 Error data not found, according to the information provided
206 Error of information received, incorrect data

Example URI

GET https://gateway.iadnet.org/api/spxtra/dimension?catID=1
URI Parameters
HideShow
catID
string (required) Example: 1

Parameter to indicate whether the search will be exclusively by code

Table catID

catID Dimension
01 Resource
02 TFWW
03 Fund
04 Function
05 Restriction
06 SDAOrgID
07 Who
08 Flag
09 Project
10 Details
Request
HideShow
Headers
Content-Type: application/json
Accept: application/json
Authorization: bearer {{TOKEN_OBTAINED_FROM_LOGIN}}
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "message": "Correct query",
  "response": [
    {
      "code": "10",
      "id": "03",
      "lookup": "Operating Fund",
      "name": "Operating Fund",
      "prohibitPosting": 0,
      "updateCount": null
    },
    {
      "code": "20",
      "id": "03",
      "lookup": "Plant Fund",
      "name": "Plant Fund",
      "prohibitPosting": 0,
      "updateCount": null
    },
    {
      "code": "AUSISTE01",
      "id": "03",
      "lookup": "AUSISTE01",
      "name": "Systems",
      "prohibitPosting": 0,
      "updateCount": null
    }
  ]
}
Response  220
HideShow

If the token is expired or invalid

Headers
Content-Type: application/json
Body
{
  "message": "Incorrect authentication",
  "error": true
}
Response  221
HideShow

If the user with which the token was registered is no longer active in SunPlusXtra

Headers
Content-Type: application/json
Body
{
  "message": "SPX user not found",
  "error": true
}
Response  201
HideShow

Other error messages defined in the table codes

Headers
Content-Type: application/json
Body
{
  "message": "Incorrect query",
  "description": "ERROR_MESSAGE",
  "code": "ERROR_CODE",
  "error": true
}

Update Dimension
PUT/dimension

Method to modify a specific dimension.

Table catID

catID Dimension
01 Resource
02 TFWW
03 Fund
04 Function
05 Restriction
06 SDAOrgID
07 Who
08 Flag
09 Project
10 Details

Table codes, Error code list

Code Description
202 Error in the data obtained
203 Error in the data obtained
206 The parameters sent are invalid

Example URI

PUT https://gateway.iadnet.org/api/spxtra/dimension
Request
HideShow
Headers
Content-Type: application/json
Accept: application/json
Authorization: bearer {{TOKEN_OBTAINED_FROM_LOGIN}}
Body
{
  "catId": "07",
  "code": "DP0121",
  "lookup": "DP012A",
  "name": "Dimension update",
  "prohibitPosting": 0
}
Schema
{
    "type": "object",
    "properties": {
        "catId": {
            "type": "string"
        },
        "code": {
            "type": "string"
        },
        "lookup": {
            "type": "string",
        },
        "prohibitPosting": {
            "type": "short",
        }
    }
}
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "message": "Correct query"
}
Response  220
HideShow

If the token is expired or invalid

Headers
Content-Type: application/json
Body
{
  "message": "Incorrect authentication",
  "error": true
}
Response  221
HideShow

If the user with which the token was registered is no longer active in SunPlusXtra

Headers
Content-Type: application/json
Body
{
  "message": "SPX user not found",
  "error": true
}
Response  201
HideShow

Other error messages defined in the table codes

Headers
Content-Type: application/json
Body
{
  "message": "Incorrect query",
  "description": "The code appears to be nonexistent",
  "code": "ERROR_CODE",
  "error": true
}

Register Dimension
POST/dimension

Method to register a dimension.

Tabla catID

catID Dimension
01 Resource
02 TFWW
03 Fund
04 Function
05 Restriction
06 SDAOrgID
07 Who
08 Flag
09 Project
10 Details

Table codes, Error code list

Code Description
202 Error in the data obtained
203 Error in the data obtained
206 The parameters sent are invalid

Example URI

POST https://gateway.iadnet.org/api/spxtra/dimension
Request
HideShow
Headers
Content-Type: application/json
Accept: application/json
Authorization: bearer {{TOKEN_OBTAINED_FROM_LOGIN}}
Body
{
  "catId": "07",
  "code": "DC0121",
  "lookup": "DC012A",
  "name": "Dimensión create",
  "prohibitPosting": 0
}
Schema
{
    "type": "object",
    "properties": {
        "catId": {
            "type": "string"
        },
        "code": {
            "type": "string"
        },
        "lookup": {
            "type": "string",
        },
        "prohibitPosting": {
            "type": "short",
        }
    }
}
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "message": "Correct query"
}
Response  220
HideShow

If the token is expired or invalid

Headers
Content-Type: application/json
Body
{
  "message": "Incorrect authentication",
  "error": true
}
Response  221
HideShow

If the user with which the token was registered is no longer active in SunPlusXtra

Headers
Content-Type: application/json
Body
{
  "message": "SPX user not found",
  "error": true
}
Response  201
HideShow

Other error messages defined in the table codes

Headers
Content-Type: application/json
Body
{
  "message": "Incorrect query",
  "description": "ERROR_MESSAGE",
  "code": "ERROR_CODE",
  "error": true
}

Delete Dimension
DELETE/dimension

Method to removing a dimension.

Tabla catID

catID Dimension
01 Resource
02 TFWW
03 Fund
04 Function
05 Restriction
06 SDAOrgID
07 Who
08 Flag
09 Project
10 Details

Table codes, Error code list

Code Description
202 Error in the data obtained
203 Error in the data obtained
206 The parameters sent are invalid

Example URI

DELETE https://gateway.iadnet.org/api/spxtra/dimension
Request
HideShow
Headers
Content-Type: application/json
Accept: application/json
Authorization: bearer {{TOKEN_OBTAINED_FROM_LOGIN}}
Body
{
  "catId": "07",
  "code": "JV0121"
}
Schema
{
  "type": "object",
  "properties": {
    "catId": {
      "type": "string"
    },
    "code": {
      "type": "string"
    }
  }
}
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "message": "Correct query"
}
Response  220
HideShow

If the token is expired or invalid

Headers
Content-Type: application/json
Body
{
  "message": "Incorrect authentication",
  "error": true
}
Response  221
HideShow

If the user with which the token was registered is no longer active in SunPlusXtra

Headers
Content-Type: application/json
Body
{
  "message": "SPX user not found",
  "error": true
}
Response  201
HideShow

Other error messages defined in the table codes

Headers
Content-Type: application/json
Body
{
  "message": "Incorrect query",
  "description": "ERROR_MESSAGE",
  "code": "ERROR_CODE",
  "error": true
}

JOURNALS

Resources available for posting a journal

Post Journal
POST/journal

Method to post a journal to SunPlus, through the SunPlusXtra API.

Table codes, Error code list

Code Description
201 Error returned by SunPlus
202 Connection error to SunPlus
203 Response error or invalid parameters

Example URI

POST https://gateway.iadnet.org/api/spxtra/journal
Request
HideShow
Headers
Content-Type: application/json
Accept: application/json
Authorization: bearer {{TOKEN_OBTAINED_FROM_LOGIN}}
Body
{
  "requestPolicyDetails": [
    {
      "line": 1,
      "expiration": "",
      "journalType": "JV",
      "account": "101110",
      "treference": "EXAMPLE",
      "source": "",
      "tfww": "1001",
      "fund": "10",
      "function": "",
      "restriction": "",
      "sdaOrganization": "",
      "who": "",
      "flag": "",
      "project": "",
      "details": "",
      "description": "LINE 1",
      "transaction": "C",
      "amount": 1,
      "currency": "MXN1",
      "transDateTime": "2018-06-30",
      "memoAmount": "",
      "period": "2018006",
      "expectedDate": "",
      "assetCode": "",
      "assetIndicator": "",
      "description1": "",
      "description2": "",
      "description3": "",
      "description4": "",
      "description5": "",
      "description6": "",
      "description7": "",
      "description8": "",
      "description9": "",
      "description10": "",
      "description11": "",
      "description12": "",
      "description13": "",
      "description14": "",
      "description15": "",
      "description16": "",
      "description17": "",
      "description18": "",
      "description19": "",
      "description20": "",
      "description21": "",
      "description22": "",
      "description23": "",
      "description24": "",
      "description25": ""
    },
    {
      "line": 2,
      "expiration": "",
      "journalType": "JV",
      "account": "101110",
      "treference": "EXAMPLE",
      "source": "",
      "tfww": "1001",
      "fund": "10",
      "function": "",
      "restriction": "",
      "sdaOrganization": "",
      "who": "",
      "flag": "",
      "project": "",
      "details": "",
      "description": "LINE 1",
      "transaction": "D",
      "amount": 1,
      "currency": "MXN1",
      "transDateTime": "2018-06-30",
      "memoAmount": "",
      "period": "2018006",
      "expectedDate": "",
      "assetCode": "",
      "assetIndicator": "",
      "description1": "",
      "description2": "",
      "description3": "",
      "description4": "",
      "description5": "",
      "description6": "",
      "description7": "",
      "description8": "",
      "description9": "",
      "description10": "",
      "description11": "",
      "description12": "",
      "description13": "",
      "description14": "",
      "description15": "",
      "description16": "",
      "description17": "",
      "description18": "",
      "description19": "",
      "description20": "",
      "description21": "",
      "description22": "",
      "description23": "",
      "description24": "",
      "description25": ""
    }
  ]
}
Schema
{
    "type": "object",
    "properties": {

        "requestPolicyDetails": {
            "type": "array",
            "items": {
                "type": "object",
                "properties": {
                    "line": {
                        "type": "integer",
                        "required" : true
                    },
                    "expiration" : {
                        "type": "string",
                        "format" : "yyyy-mm-dd",
                        "required" : false
                    },
                    "journalType" : {
                        "type" : "string",
                        "required" : true
                    },
                    "account" : {
                        "type" : "string",
                        "required" : true
                    },
                    "treference" : {
                        "type" : "string",
                        "required" : true
                    },
                    "source" : {
                        "type" : "string",
                        "required" : false
                    },
                    "tfww" : {
                        "type" : "string",
                        "required" : false
                    },
                    "fund" : {
                        "type" : "string",
                        "required" : false
                    },
                    "function" : {
                        "type" : "string",
                        "required" : false
                    },
                    "restriction" : {
                        "type" : "string",
                        "required" : false
                    },
                    "sdaOrganization" : {
                        "type" : "string",
                        "required" : false
                    },
                    "who" : {
                        "type" : "string",
                        "required" : false
                    },
                    "flag" : {
                        "type" : "string",
                        "required" : false
                    },
                    "project" : {
                        "type" : "string",
                        "required" : false
                    },
                    "details" : {
                        "type" : "string",
                        "required" : false
                    },
                    "description" : {
                        "type" : "string",
                        "required" : true
                    },
                    "transaction" : {
                        "type" : "string",
                        "required" : true,
                        "option" : ['C', 'D']
                    },
                    "amount" : {
                        "type" : "numeric",
                        "required" : true
                    },
                    "currency" : {
                        "type" : "string",
                        "required" : true
                    },
                    "transDateTime" : {
                        "type" : "string",
                        "format" : "yyyy-mm-dd",
                        "required" : true
                    },
                    "memoAmount" : {
                        "type" : "numeric",
                        "required" : false
                    },
                    "period" : {
                        "type" : "string",
                        "format" : "yyyy'0mm",
                        "required" : true
                    },
                    "expectedDate" : {
                        "type" : "string",
                        "format" : "yyyy-mm-dd",
                        "required" : false
                    },
                    "assetCode" : {
                        "type" : "string",
                        "required" : false
                    },
                    "assetIndicator" : {
                        "type" : "string",
                        "required" : false
                    },
                    "description1" : {
                        "type" : "string",
                        "required" : false
                    },
                    "description2" : {
                        "type" : "string",
                        "required" : false
                    },
                    "description3" : {
                        "type" : "string",
                        "required" : false
                    },
                    "description4" : {
                        "type" : "string",
                        "required" : false
                    },
                    "description5" : {
                        "type" : "string",
                        "required" : false
                    },
                    "description6" : {
                        "type" : "string",
                        "required" : false
                    },
                    "description7" : {
                        "type" : "string",
                        "required" : false
                    },
                    "description8" : {
                        "type" : "string",
                        "required" : false
                    },
                    "description9" : {
                        "type" : "string",
                        "required" : false
                    },
                    "description10" : {
                        "type" : "string",
                        "required" : false
                    }
                }
            }
        }
    }
}
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
    "message": "Successful operation"
    "response": {
        "journalNumber": "6994",
        "voucherNumber": "JV2018-1547",
    }
}
Response  220
HideShow

If the token is expired or invalid

Headers
Content-Type: application/json
Body
{
  "message": "Incorrect authentication",
  "error": true
}
Response  221
HideShow

If the user with which the token was registered is no longer active in SunPlusXtra

Headers
Content-Type: application/json
Body
{
  "message": "SPX user not found",
  "error": true
}
Response  201
HideShow

Other error messages defined in the table codes

Headers
Content-Type: application/json
Body
{
    "message" : "Incorrect query",
    "description" : "ERROR_MESSAGE",
    "code" : "ERROR_CODE",
    "error" : true
    "linesError": [
        {
            "line": 1,
            "message": "Account record not found"
        },
        {
            "line": 2,
            "message": "Unknown account code 642198"
        }
    ]
}

Print Journal
POST/journal/print{?lang}

Method to printing a journal to SunPlus, through the SunPlusXtra API.

Table printFormat

Formats Description
PFP Print Financial Policy
PP Print Payment
PC Print Check
PR Print Receipt
PCS Print Cash Register Report
PNM Print Notice

Table codes, Error code list

Code Description
201 Error returned by SunPlus
202 Connection error to SunPlus
203 Response error or invalid parameters
204 Printing is not available.

There are two ways to print a journal: the first is by using the default logo through Request, and the second by using a custom logo with the logoSource key through Request Custom Logo.

To print with a custom logo, it is necessary to provide a logoOption object with a logoSource key, which should be a logo in .jpg or .png format encoded in base64.

Example URI

POST https://gateway.iadnet.org/api/spxtra/journal/print?lang=en
URI Parameters
HideShow
lang
string (required) Example: en

Parameter to indicate the language of the journal printing

Language Description
en English
es Spanish
fr French
Request
HideShow
Headers
Content-Type: application/json
Accept: application/json
Authorization: bearer {{TOKEN_OBTAINED_FROM_LOGIN}}
Body
{
  "journalNumber": 5588,
  "book": "A",
  "printFormat": "PNM"
}
Schema
{
  "type": "object",
  "properties": {
    "journalNumber": {
      "type": "integer"
    },
    "book": {
      "type": "string"
    },
    "printFormat": {
      "type": "string"
    }
  }
}
Request  Custom logo
HideShow
Headers
Content-Type: application/json
Accept: application/json
Authorization: bearer {{TOKEN_OBTAINED_FROM_LOGIN}}
Body
{
  "journalNumber": 5588,
  "book": "A",
  "printFormat": "PNM",
  "logoOption": {
    "logoSource": "IMAGE_base64"
  }
}
Schema
{
  "type": "object",
  "properties": {
    "journalNumber": {
      "type": "integer"
    },
    "book": {
      "type": "string"
    },
    "printFormat": {
      "type": "string"
    },
    "logoOption": {
      "type": "object",
      "properties": {
        "logoSource": {
          "type": "string"
        }
      }
    }
  }
}
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "message": "Successfully uploaded",
  "response": "{PDF_base64}"
}
Response  220
HideShow

If the token is expired or invalid

Headers
Content-Type: application/json
Body
{
  "message": "Incorrect authentication",
  "error": true
}
Response  221
HideShow

If the user with which the token was registered is no longer active in SunPlusXtra

Headers
Content-Type: application/json
Body
{
  "message": "SPX user not found",
  "error": true
}
Response  201
HideShow

Other error messages defined in the table codes

Headers
Content-Type: application/json
Body
{
  "message": "Incorrect query",
  "description": "ERROR_MESSAGE",
  "code": "ERROR_CODE",
  "error": true
}

Journal Range
POST/journal/range/{startJournallNumber}/{endJournallNumber}

Method to obtain a range of posted journals in SunPlus through the SunPlusXtra API.

Table codes, Error code list

Code Description
201 Error returned by SunPlus
202 Connection error to SunPlus
203 Response error or invalid parameters

Example URI

POST https://gateway.iadnet.org/api/spxtra/journal/range/5326/5328
URI Parameters
HideShow
startJournallNumber
string (required) Example: 5326

Initial journal number

endJournallNumber
string (required) Example: 5328

Final journal number

Request
HideShow
Headers
Content-Type: application/json
Accept: application/json
Authorization: bearer {{TOKEN_OBTAINED_FROM_LOGIN}}
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "message": "Successfully uploaded",
  "response": [
    {
      "lines": [
        {
          "journalDetail": {
            "accntCode": "371110         ",
            "afterPstgDateTime": 1626843600000,
            "allocDateTime": 1626843600000,
            "allocId": null,
            "allocInProgress": " ",
            "allocPeriod": 2018006,
            "allocRef": 1285,
            "allocation": "A",
            "allocnCode": null,
            "allocnStmnts": null,
            "amount": -94281.85,
            "analT0": "               ",
            "analT1": "NF             ",
            "analT2": "10             ",
            "analT3": "               ",
            "analT4": "               ",
            "analT5": "*              ",
            "analT6": "               ",
            "analT7": "               ",
            "analT8": "               ",
            "analT9": "               ",
            "assetCode": "          ",
            "assetInd": " ",
            "assetSub": "     ",
            "cleardown": "0    ",
            "convCode": "MXN1 ",
            "convRate": 1,
            "cv4Amt": -94281.85,
            "cv4ConvCode": "MXN1 ",
            "cv4ConvRate": 1,
            "cv4Dp": "2",
            "cv4Operator": "*",
            "dc": "D",
            "descriptn": "cash closing",
            "dueDateTime": 1532149200000,
            "entryDateTime": 1626843600000,
            "entryPrd": 2018006,
            "inUseFlag": " ",
            "journalReference": 0,
            "jrnalLine": 1,
            "jrnalNo": 5326,
            "jrnalSrce": "ZC1  ",
            "jrnalType": "JV   ",
            "lossGain": " ",
            "memoAmt": 0,
            "monedaPlural": "PESOS",
            "monedaSingular": "PESO",
            "nombreMoneda": "MEXICAN PESO",
            "otherAmt": -94281.85,
            "otherDp": "2",
            "period": 2018006,
            "postingDateTime": 1626843600000,
            "principalReqd": 0,
            "reportAmt": 0,
            "reversal": " ",
            "roughFlag": " ",
            "transDateTime": 1532149200000,
            "vouchrNum": "JV2018-0714",
            "treference": "closing                        "
          }
        },
        {
          "journalDetail": {
            "accntCode": "371110         ",
            "afterPstgDateTime": 1626843600000,
            "allocDateTime": 1626843600000,
            "allocId": null,
            "allocInProgress": " ",
            "allocPeriod": 2018006,
            "allocRef": 1285,
            "allocation": "A",
            "allocnCode": null,
            "allocnStmnts": null,
            "amount": -777550.52,
            "analT0": "               ",
            "analT1": "NF             ",
            "analT2": "10             ",
            "analT3": "               ",
            "analT4": "               ",
            "analT5": "*              ",
            "analT6": "               ",
            "analT7": "               ",
            "analT8": "               ",
            "analT9": "               ",
            "assetCode": "          ",
            "assetInd": " ",
            "assetSub": "     ",
            "cleardown": "0    ",
            "convCode": "MXN1 ",
            "convRate": 1,
            "cv4Amt": -777550.52,
            "cv4ConvCode": "MXN1 ",
            "cv4ConvRate": 1,
            "cv4Dp": "2",
            "cv4Operator": "*",
            "dc": "D",
            "descriptn": "cash closing",
            "dueDateTime": 1532149200000,
            "entryDateTime": 1626843600000,
            "entryPrd": 2018006,
            "inUseFlag": " ",
            "journalReference": 0,
            "jrnalLine": 2,
            "jrnalNo": 5326,
            "jrnalSrce": "ZC1  ",
            "jrnalType": "JV   ",
            "lossGain": " ",
            "memoAmt": 0,
            "monedaPlural": "PESOS",
            "monedaSingular": "PESO",
            "nombreMoneda": "MEXICAN PESO",
            "otherAmt": -777550.52,
            "otherDp": "2",
            "period": 2018006,
            "postingDateTime": 1626843600000,
            "principalReqd": 0,
            "reportAmt": 0,
            "reversal": " ",
            "roughFlag": " ",
            "transDateTime": 1532149200000,
            "vchrNum": "JV2018-0714",
            "treference": "closing                        "
          }
        },
        {
          "journalDetail": {
            "accntCode": "101110         ",
            "afterPstgDateTime": 1626843600000,
            "allocDateTime": 1626843600000,
            "allocId": null,
            "allocInProgress": " ",
            "allocPeriod": 0,
            "allocRef": 0,
            "allocation": " ",
            "allocnCode": null,
            "allocnStmnts": null,
            "amount": 871832.37,
            "analT0": "               ",
            "analT1": "NF             ",
            "analT2": "10             ",
            "analT3": "               ",
            "analT4": "               ",
            "analT5": "               ",
            "analT6": "               ",
            "analT7": "               ",
            "analT8": "               ",
            "analT9": "               ",
            "assetCode": "          ",
            "assetInd": " ",
            "assetSub": "     ",
            "cleardown": "00000",
            "convCode": "MXN1 ",
            "convRate": 1,
            "cv4Amt": 871832.37,
            "cv4ConvCode": "MXN1 ",
            "cv4ConvRate": 1,
            "cv4Dp": "2",
            "cv4Operator": "*",
            "dc": "C",
            "descriptn": "cash closing",
            "dueDateTime": 1532149200000,
            "entryDateTime": 1626843600000,
            "entryPrd": 2018006,
            "inUseFlag": " ",
            "journalReference": 0,
            "jrnalLine": 3,
            "jrnalNo": 5326,
            "jrnalSrce": "ZC1  ",
            "jrnalType": "JV   ",
            "lossGain": " ",
            "memoAmt": 0,
            "monedaPlural": "PESOS",
            "monedaSingular": "PESO",
            "nombreMoneda": "MEXICAN PESO",
            "otherAmt": 871832.37,
            "otherDp": "2",
            "period": 2018006,
            "postingDateTime": 1626843600000,
            "principalReqd": 0,
            "reportAmt": 0,
            "transDateTime": 1532149200000,
            "vchrNum": "JV2018-0714",
            "treference": "closing                        "
          }
        }
      ],
      "jrnalNo": 5326
    }
  ]
}
Schema
{
  "type": "object",
  "properties": {
    "message": {
      "type": "string"
    },
    "response": {
      "type": "array",
      "items": [
        {
          "type": "object",
          "properties": {
            "lineas": {
              "type": "array",
              "items": [
                {
                  "type": "object",
                  "properties": {
                    "journalDetail": {
                      "type": "object",
                      "properties": {
                        "accntCode": {
                          "type": "string"
                        },
                        "afterPstgDateTime": {
                          "type": "integer"
                        },
                        "allocDateTime": {
                          "type": "integer"
                        },
                        "allocId": {
                          "type": "integer"
                        },
                        "allocInProgress": {
                          "type": "string"
                        },
                        "allocPeriod": {
                          "type": "integer"
                        },
                        "allocRef": {
                          "type": "integer"
                        },
                        "allocation": {
                          "type": "string"
                        },
                        "allocnCode": {
                          "type": "string"
                        },
                        "allocnStmnts": {
                          "type": "string"
                        },
                        "amount": {
                          "type": "number"
                        },
                        "analT0": {
                          "type": "string"
                        },
                        "analT1": {
                          "type": "string"
                        },
                        "analT2": {
                          "type": "string"
                        },
                        "analT3": {
                          "type": "string"
                        },
                        "analT4": {
                          "type": "string"
                        },
                        "analT5": {
                          "type": "string"
                        },
                        "analT6": {
                          "type": "string"
                        },
                        "analT7": {
                          "type": "string"
                        },
                        "analT8": {
                          "type": "string"
                        },
                        "analT9": {
                          "type": "string"
                        },
                        "assetCode": {
                          "type": "string"
                        },
                        "assetInd": {
                          "type": "string"
                        },
                        "assetSub": {
                          "type": "string"
                        },
                        "cleardown": {
                          "type": "string"
                        },
                        "convCode": {
                          "type": "string"
                        },
                        "convRate": {
                          "type": "integer"
                        },
                        "cv4Amt": {
                          "type": "number"
                        },
                        "cv4ConvCode": {
                          "type": "string"
                        },
                        "cv4ConvRate": {
                          "type": "integer"
                        },
                        "cv4Dp": {
                          "type": "string"
                        },
                        "cv4Operator": {
                          "type": "string"
                        },
                        "dc": {
                          "type": "string"
                        },
                        "descriptn": {
                          "type": "string"
                        },
                        "dueDateTime": {
                          "type": "integer"
                        },
                        "entryDateTime": {
                          "type": "integer"
                        },
                        "entryPrd": {
                          "type": "integer"
                        },
                        "inUseFlag": {
                          "type": "string"
                        },
                        "journalReference": {
                          "type": "integer"
                        },
                        "jrnalLine": {
                          "type": "integer"
                        },
                        "jrnalNo": {
                          "type": "integer"
                        },
                        "jrnalSrce": {
                          "type": "string"
                        },
                        "jrnalType": {
                          "type": "string"
                        },
                        "lossGain": {
                          "type": "string"
                        },
                        "memoAmt": {
                          "type": "integer"
                        },
                        "monedaPlural": {
                          "type": "string"
                        },
                        "monedaSingular": {
                          "type": "string"
                        },
                        "nombreMoneda": {
                          "type": "string"
                        },
                        "otherAmt": {
                          "type": "number"
                        },
                        "otherDp": {
                          "type": "string"
                        },
                        "period": {
                          "type": "integer"
                        },
                        "postingDateTime": {
                          "type": "integer"
                        },
                        "principalReqd": {
                          "type": "integer"
                        },
                        "reportAmt": {
                          "type": "integer"
                        },
                        "reversal": {
                          "type": "string"
                        },
                        "roughFlag": {
                          "type": "string"
                        },
                        "transDateTime": {
                          "type": "integer"
                        },
                        "vchrNum": {
                          "type": "string"
                        },
                        "treference": {
                          "type": "string"
                        }
                      }
                    }
                  }
                },
                {
                  "type": "object",
                  "properties": {
                    "journalDetalle": {
                      "type": "object",
                      "properties": {
                        "accntCode": {
                          "type": "string"
                        },
                        "afterPstgDateTime": {
                          "type": "integer"
                        },
                        "allocDateTime": {
                          "type": "integer"
                        },
                        "allocId": {
                          "type": "integer"
                        },
                        "allocInProgress": {
                          "type": "string"
                        },
                        "allocPeriod": {
                          "type": "integer"
                        },
                        "allocRef": {
                          "type": "integer"
                        },
                        "allocation": {
                          "type": "string"
                        },
                        "allocnCode": {
                          "type": "string"
                        },
                        "allocnStmnts": {
                          "type": "string"
                        },
                        "amount": {
                          "type": "number"
                        },
                        "analT0": {
                          "type": "string"
                        },
                        "analT1": {
                          "type": "string"
                        },
                        "analT2": {
                          "type": "string"
                        },
                        "analT3": {
                          "type": "string"
                        },
                        "analT4": {
                          "type": "string"
                        },
                        "analT5": {
                          "type": "string"
                        },
                        "analT6": {
                          "type": "string"
                        },
                        "analT7": {
                          "type": "string"
                        },
                        "analT8": {
                          "type": "string"
                        },
                        "analT9": {
                          "type": "string"
                        },
                        "assetCode": {
                          "type": "string"
                        },
                        "assetInd": {
                          "type": "string"
                        },
                        "assetSub": {
                          "type": "string"
                        },
                        "cleardown": {
                          "type": "string"
                        },
                        "convCode": {
                          "type": "string"
                        },
                        "convRate": {
                          "type": "integer"
                        },
                        "cv4Amt": {
                          "type": "number"
                        },
                        "cv4ConvCode": {
                          "type": "string"
                        },
                        "cv4ConvRate": {
                          "type": "integer"
                        },
                        "cv4Dp": {
                          "type": "string"
                        },
                        "cv4Operator": {
                          "type": "string"
                        },
                        "dc": {
                          "type": "string"
                        },
                        "descriptn": {
                          "type": "string"
                        },
                        "dueDateTime": {
                          "type": "integer"
                        },
                        "entryDateTime": {
                          "type": "integer"
                        },
                        "entryPrd": {
                          "type": "integer"
                        },
                        "inUseFlag": {
                          "type": "string"
                        },
                        "journalReference": {
                          "type": "integer"
                        },
                        "jrnalLine": {
                          "type": "integer"
                        },
                        "jrnalNo": {
                          "type": "integer"
                        },
                        "jrnalSrce": {
                          "type": "string"
                        },
                        "jrnalType": {
                          "type": "string"
                        },
                        "lossGain": {
                          "type": "string"
                        },
                        "memoAmt": {
                          "type": "integer"
                        },
                        "monedaPlural": {
                          "type": "string"
                        },
                        "monedaSingular": {
                          "type": "string"
                        },
                        "nombreMoneda": {
                          "type": "string"
                        },
                        "otherAmt": {
                          "type": "number"
                        },
                        "otherDp": {
                          "type": "string"
                        },
                        "period": {
                          "type": "integer"
                        },
                        "postingDateTime": {
                          "type": "integer"
                        },
                        "principalReqd": {
                          "type": "integer"
                        },
                        "reportAmt": {
                          "type": "integer"
                        },
                        "reversal": {
                          "type": "string"
                        },
                        "roughFlag": {
                          "type": "string"
                        },
                        "transDateTime": {
                          "type": "integer"
                        },
                        "vchrNum": {
                          "type": "string"
                        },
                        "treference": {
                          "type": "string"
                        }
                      }
                    }
                  }
                },
                {
                  "type": "object",
                  "properties": {
                    "journalDetalle": {
                      "type": "object",
                      "properties": {
                        "accntCode": {
                          "type": "string"
                        },
                        "afterPstgDateTime": {
                          "type": "integer"
                        },
                        "allocDateTime": {
                          "type": "integer"
                        },
                        "allocId": {
                          "type": "integer"
                        },
                        "allocInProgress": {
                          "type": "string"
                        },
                        "allocPeriod": {
                          "type": "integer"
                        },
                        "allocRef": {
                          "type": "integer"
                        },
                        "allocation": {
                          "type": "string"
                        },
                        "allocnCode": {
                          "type": "string"
                        },
                        "allocnStmnts": {
                          "type": "string"
                        },
                        "amount": {
                          "type": "number"
                        },
                        "analT0": {
                          "type": "string"
                        },
                        "analT1": {
                          "type": "string"
                        },
                        "analT2": {
                          "type": "string"
                        },
                        "analT3": {
                          "type": "string"
                        },
                        "analT4": {
                          "type": "string"
                        },
                        "analT5": {
                          "type": "string"
                        },
                        "analT6": {
                          "type": "string"
                        },
                        "analT7": {
                          "type": "string"
                        },
                        "analT8": {
                          "type": "string"
                        },
                        "analT9": {
                          "type": "string"
                        },
                        "assetCode": {
                          "type": "string"
                        },
                        "assetInd": {
                          "type": "string"
                        },
                        "assetSub": {
                          "type": "string"
                        },
                        "cleardown": {
                          "type": "string"
                        },
                        "convCode": {
                          "type": "string"
                        },
                        "convRate": {
                          "type": "integer"
                        },
                        "cv4Amt": {
                          "type": "number"
                        },
                        "cv4ConvCode": {
                          "type": "string"
                        },
                        "cv4ConvRate": {
                          "type": "integer"
                        },
                        "cv4Dp": {
                          "type": "string"
                        },
                        "cv4Operator": {
                          "type": "string"
                        },
                        "dc": {
                          "type": "string"
                        },
                        "descriptn": {
                          "type": "string"
                        },
                        "dueDateTime": {
                          "type": "integer"
                        },
                        "entryDateTime": {
                          "type": "integer"
                        },
                        "entryPrd": {
                          "type": "integer"
                        },
                        "inUseFlag": {
                          "type": "string"
                        },
                        "journalReference": {
                          "type": "integer"
                        },
                        "jrnalLine": {
                          "type": "integer"
                        },
                        "jrnalNo": {
                          "type": "integer"
                        },
                        "jrnalSrce": {
                          "type": "string"
                        },
                        "jrnalType": {
                          "type": "string"
                        },
                        "lossGain": {
                          "type": "string"
                        },
                        "memoAmt": {
                          "type": "integer"
                        },
                        "monedaPlural": {
                          "type": "string"
                        },
                        "monedaSingular": {
                          "type": "string"
                        },
                        "nombreMoneda": {
                          "type": "string"
                        },
                        "otherAmt": {
                          "type": "number"
                        },
                        "otherDp": {
                          "type": "string"
                        },
                        "period": {
                          "type": "integer"
                        },
                        "postingDateTime": {
                          "type": "integer"
                        },
                        "principalReqd": {
                          "type": "integer"
                        },
                        "reportAmt": {
                          "type": "integer"
                        },
                        "transDateTime": {
                          "type": "integer"
                        },
                        "vchrNum": {
                          "type": "string"
                        },
                        "treference": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              ]
            },
            "jrnalNo": {
              "type": "integer"
            }
          }
        }
      ]
    }
  }
}
Response  220
HideShow

If the token is expired or invalid

Headers
Content-Type: application/json
Body
{
  "message": "Incorrect authentication",
  "error": true
}
Response  221
HideShow

If the user with which the token was registered is no longer active in SunPlusXtra

Headers
Content-Type: application/json
Body
{
  "message": "SPX user not found",
  "error": true
}
Response  201
HideShow

Other error messages defined in the table codes

Headers
Content-Type: application/json
Body
{
  "message": "Incorrect query",
  "description": "ERROR_MESSAGE",
  "code": "ERROR_CODE",
  "error": true
}

List of types of journals
GET/journal/type-list

Method to get a list of journal types published to SunPlus via the SunPlusXtra API.

Table codes, Error code list

Code Description
201 Error returned by SunPlus
202 Connection error to SunPlus

Example URI

GET https://gateway.iadnet.org/api/spxtra/journal/type-list
Request
HideShow
Headers
Content-Type: application/json
Accept: application/json
Authorization: bearer {{TOKEN_OBTAINED_FROM_LOGIN}}
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
    "message": "Correct query",
    "response": [
        {
            "journalName": "Accounts Payable Journal",
            "journalType": "AP"
        },
        {
            "journalName": "Budget Journal",
            "journalType": "BGT"
        },
        {
            "journalName": "Cash Receipts Journal",
            "journalType": "CR"
        },
        {
            "journalName": "Deposit Journal",
            "journalType": "DP"
        },
        {
            "journalName": "Journal Voucher",
            "journalType": "JV"
        },
        {
            "journalName": "Manually Generated Check for xxxxx Bank",
            "journalType": "MG110"
        },
        {
            "journalName": "Payroll Journal",
            "journalType": "PAY"
        },
        {
            "journalName": "Petty Cash",
            "journalType": "PC"
        },
        {
            "journalName": "System Journal",
            "journalType": "SYSTM"
        },
    ]
}
Schema
{
        "type": "object",
        "properties": {
            "message": {
                "type": "string"
            },
            "response": {
                "type": "array",
                "properties": {
                    "journalName": {
                        "type": "string"
                    },
                    "journalType": {
                        "type": "string"
                    },
                }
            }
        }
    }
Response  220
HideShow

If the token is expired or invalid

Headers
Content-Type: application/json
Body
{
  "message": "Incorrect authentication",
  "error": true
}
Response  221
HideShow

If the user with which the token was registered is no longer active in SunPlusXtra

Headers
Content-Type: application/json
Body
{
  "message": "SPX user not found",
  "error": true
}
Response  201
HideShow

Other error messages defined in the table codes

Headers
Content-Type: application/json
Body
{
  "message": "Incorrect query",
  "description": "ERROR_MESSAGE",
  "code": "ERROR_CODE",
  "error": true
}

ADDRESS

Available resources for addresses

List Address
GET/address

Method to retrieve the list of addresses

Table codes, Error code list

Code Description
201 Error returned by SunPlus
202 Connection error to SunPlus
203 Response error or invalid parameters

Example URI

GET https://gateway.iadnet.org/api/spxtra/address
Request
HideShow
Headers
Content-Type: application/json
Accept: application/json
Authorization: bearer {{TOKEN_OBTAINED_FROM_LOGIN}}
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "message": "Correct query",
  "response": [
    {
      "addressCode": "4536789123",
      "addressLine1": "Cathedral of San Felipe",
      "addressLine2": "Santa Clara Housing Unit",
      "addressLine3": "Avenida del Sol 145, Col. Centro, Mexico City 01000",
      "addressLine4": "RFC CSF980423JS4",
      "addressLine5": "Civil Association with Social Purposes",
      "area": "_church_logo.jpg",
      "faxNumber": "+1(555) 322-1212",
      "lookupCode": "B",
      "postalCode": "01000",
      "shortHeading": "Santa Clara",
      "status": 1,
      "telephoneNumber": "+1(555) 322-1200",
      "webPageAddress": "www.cathedral-san-felipe.org",
      "analysisCodes": {
        "Analysis1": {
          "id": "25",
          "code": "5",
          "entryNum": "9"
        },
        "Analysis2": {
          "id": "22",
          "code": "15",
          "entryNum": "5"
        }
      },
      "emailAddress": "contact@cathedral-san-felipe.org"
    }
  ]
}
Schema
{
  "type": "object",
  "properties": {
    "message": {
      "type": "string"
    },
    "response": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "addressCode": {
            "type": "string"
          },
          "addressLine1": {
            "type": "string"
          },
          "addressLine2": {
            "type": "string"
          },
          "addressLine3": {
            "type": "string"
          },
          "addressLine4": {
            "type": "string"
          },
          "addressLine5": {
            "type": "string"
          },
          "area": {
            "type": "string"
          },
          "faxNumber": {
            "type": "string"
          },
          "lookupCode": {
            "type": "string"
          },
          "postalCode": {
            "type": [
              "string",
              "null"
            ]
          },
          "shortHeading": {
            "type": "string"
          },
          "status": {
            "type": "integer"
          },
          "telephoneNumber": {
            "type": "string"
          },
          "webPageAddress": {
            "type": "string"
          },
          "analysisCodes": {
            "type": "object",
            "properties": {
              "Analysis1": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string"
                  },
                  "code": {
                    "type": "string"
                  },
                  "entryNum": {
                    "type": "string"
                  }
                }
              },
              "Analysis2": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string"
                  },
                  "code": {
                    "type": "string"
                  },
                  "entryNum": {
                    "type": "string"
                  }
                }
              }
            }
          },
          "emailAddress": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      }
    }
  }
}
Response  220
HideShow

If the token is expired or invalid

Headers
Content-Type: application/json
Body
{
  "message": "Incorrect authentication",
  "error": true
}
Response  221
HideShow

If the user with which the token was registered is no longer active in SunPlusXtra

Headers
Content-Type: application/json
Body
{
  "message": "SPX user not found",
  "error": true
}
Response  201
HideShow

Other error messages defined in the table codes

Headers
Content-Type: application/json
Body
{
  "message": "Incorrect query",
  "description": "ERROR_MESSAGE",
  "code": "ERROR_CODE",
  "error": true
}

List Analysis Code
GET/address/required-analysis-codes

Method to retrieve the list of analysis codes for addresses

Table codes, Error code list

Code Description
201 Error returned by SunPlus
202 Connection error to SunPlus
203 Response error or invalid parameters

Example URI

GET https://gateway.iadnet.org/api/spxtra/address/required-analysis-codes
Request
HideShow
Headers
Content-Type: application/json
Accept: application/json
Authorization: bearer {{TOKEN_OBTAINED_FROM_LOGIN}}
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
    "message": "Correct query",
    "response": {
        "Analysis1": {
            "anlCatId": 20,
            "anlEntId": 138,
            "entryNum": 1,
            "shortHeading": "TYPEDOC"
        },
        "Analysis2": {
            "anlCatId": 17,
            "anlEntId": 138,
            "entryNum": 2,
            "shortHeading": "NATJUR"
        },
        "Analysis3": {
            "anlCatId": 14,
            "anlEntId": 138,
            "entryNum": 3,
            "shortHeading": "ACTECO"
        },
        "Analysis4": {
            "anlCatId": 19,
            "anlEntId": 138,
            "entryNum": 4,
            "shortHeading": "TYPEWHO"
        },
    }
}
Schema
{
    "type": "object",
    "properties": {
        "message": {
            "type": "string"
        },
        "response": {
            "type": "object",
            "properties": {
                "Analysis1": {
                    "type": "object",
                    "properties": {
                        "anlCatId": {
                            "type": "integer"
                        },
                        "anlEntId": {
                            "type": "integer"
                        },
                        "entryNum": {
                            "type": "integer"
                        },
                        "shortHeading": {
                            "type": "string"
                        }
                    }
                },
                "Analysis2": {
                    "type": "object",
                    "properties": {
                        "anlCatId": {
                            "type": "integer"
                        },
                        "anlEntId": {
                            "type": "integer"
                        },
                        "entryNum": {
                            "type": "integer"
                        },
                        "shortHeading": {
                            "type": "string"
                        }
                    }
                },
                "Analysis3": {
                    "type": "object",
                    "properties": {
                        "anlCatId": {
                            "type": "integer"
                        },
                        "anlEntId": {
                            "type": "integer"
                        },
                        "entryNum": {
                            "type": "integer"
                        },
                        "shortHeading": {
                            "type": "string"
                        }
                    }
                },
                "Analysis4": {
                    "type": "object",
                    "properties": {
                        "anlCatId": {
                            "type": "integer"
                        },
                        "anlEntId": {
                            "type": "integer"
                        },
                        "entryNum": {
                            "type": "integer"
                        },
                        "shortHeading": {
                            "type": "string"
                        }
                    }
                }
            }
        }
    }
}
Response  220
HideShow

If the token is expired or invalid

Headers
Content-Type: application/json
Body
{
  "message": "Incorrect authentication",
  "error": true
}
Response  221
HideShow

If the user with which the token was registered is no longer active in SunPlusXtra

Headers
Content-Type: application/json
Body
{
  "message": "SPX user not found",
  "error": true
}
Response  201
HideShow

Other error messages defined in the table codes

Headers
Content-Type: application/json
Body
{
  "message": "Incorrect query",
  "description": "ERROR_MESSAGE",
  "code": "ERROR_CODE",
  "error": true
}

Register Address
POST/address

Method to register a address

Table codes, Error code list

Code Description
201 Error returned by SunPlus
202 Connection error to SunPlus
203 Error data not found, according to the information provided
206 Error of information received, incorrect data

Example URI

POST https://gateway.iadnet.org/api/spxtra/address
Request
HideShow
Headers
Content-Type: application/json
Accept: application/json
Authorization: bearer {{TOKEN_OBTAINED_FROM_LOGIN}}
Body
{
  "addressCode": "4536789123",
  "addressLine1": "St. Mark's Lutheran Church",
  "addressLine2": "Eastside Community Center",
  "addressLine3": "1234 Maple Ave, Downtown, Springfield 12345",
  "addressLine4": "RFC SML12345678",
  "addressLine5": "Non-Profit Religious Organization",
  "area": "_church_logo.jpg",
  "faxNumber": "+1(512) 555-7865",
  "lookupCode": "B",
  "postalCode": null,
  "shortHeading": "EASTSIDE",
  "status": 1,
  "telephoneNumber": "+1(512) 555-7820",
  "webPageAddress": "www.stmarks-lutheran.org",
  "analysisCodes": {
    "Analysis1": {
      "id": "23",
      "code": "12",
      "entryNum": "3"
    },
    "Analysis2": {
      "id": "23",
      "code": "12",
      "entryNum": "3"
    }
  },
  "emailAddress": null
}
Schema
{
  "type": "object",
  "properties": {
    "message": {
      "type": "string"
    },
    "response": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "addressCode": {
            "type": "string"
          },
          "addressLine1": {
            "type": "string"
          },
          "addressLine2": {
            "type": "string"
          },
          "addressLine3": {
            "type": "string"
          },
          "addressLine4": {
            "type": "string"
          },
          "addressLine5": {
            "type": "string"
          },
          "area": {
            "type": "string"
          },
          "faxNumber": {
            "type": "string"
          },
          "lookupCode": {
            "type": "string"
          },
          "postalCode": {
            "type": [
              "string",
              "null"
            ]
          },
          "shortHeading": {
            "type": "string"
          },
          "status": {
            "type": "integer"
          },
          "telephoneNumber": {
            "type": "string"
          },
          "webPageAddress": {
            "type": "string"
          },
          "analysisCodes": {
            "type": "object",
            "properties": {
              "Analysis1": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string"
                  },
                  "code": {
                    "type": "string"
                  },
                  "entryNum": {
                    "type": "string"
                  }
                }
              },
              "Analysis2": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string"
                  },
                  "code": {
                    "type": "string"
                  },
                  "entryNum": {
                    "type": "string"
                  }
                }
              }
            }
          },
          "emailAddress": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      }
    }
  }
}
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "message": "Correct query"
}
Response  220
HideShow

If the token is expired or invalid

Headers
Content-Type: application/json
Body
{
  "message": "Incorrect authentication",
  "error": true
}
Response  221
HideShow

If the user with which the token was registered is no longer active in SunPlusXtra

Headers
Content-Type: application/json
Body
{
  "message": "SPX user not found",
  "error": true
}
Response  201
HideShow

Other error messages defined in the table codes

Headers
Content-Type: application/json
Body
{
  "message": "Incorrect query",
  "description": "ERROR_MESSAGE",
  "code": "ERROR_CODE",
  "error": true
}

Update Address
PUT/address

Method to update a address

Table codes, Error code list

Code Description
201 Error returned by SunPlus
202 Connection error to SunPlus
203 Error data not found, according to the information provided
206 Error of information received, incorrect data

Example URI

PUT https://gateway.iadnet.org/api/spxtra/address
Request
HideShow
Headers
Content-Type: application/json
Accept: application/json
Authorization: bearer {{TOKEN_OBTAINED_FROM_LOGIN}}
Body
{
  "addressCode": "4536789123",
  "addressLine1": "St. Mark's Lutheran Church",
  "addressLine2": "Eastside Community Center",
  "addressLine3": "1234 Maple Ave, Downtown, Springfield 12345",
  "addressLine4": "RFC SMS12345678",
  "addressLine5": "Non-Profit Religious Organization",
  "area": "_church_logo.jpg",
  "faxNumber": "+1(512) 555-7865",
  "lookupCode": "B",
  "postalCode": null,
  "shortHeading": "EASTSIDE",
  "status": 2,
  "telephoneNumber": "+1(512) 555-7820",
  "webPageAddress": "www.stmarks-lutheran.org",
  "analysisCodes": {
    "Analysis1": {
      "id": "23",
      "code": "12",
      "entryNum": "3"
    },
    "Analysis2": {
      "id": "23",
      "code": "12",
      "entryNum": "3"
    }
  },
  "emailAddress": null
}
Schema
{
  "type": "object",
  "properties": {
    "message": {
      "type": "string"
    },
    "response": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "addressCode": {
            "type": "string"
          },
          "addressLine1": {
            "type": "string"
          },
          "addressLine2": {
            "type": "string"
          },
          "addressLine3": {
            "type": "string"
          },
          "addressLine4": {
            "type": "string"
          },
          "addressLine5": {
            "type": "string"
          },
          "area": {
            "type": "string"
          },
          "faxNumber": {
            "type": "string"
          },
          "lookupCode": {
            "type": "string"
          },
          "postalCode": {
            "type": [
              "string",
              "null"
            ]
          },
          "shortHeading": {
            "type": "string"
          },
          "status": {
            "type": "integer"
          },
          "telephoneNumber": {
            "type": "string"
          },
          "webPageAddress": {
            "type": "string"
          },
          "analysisCodes": {
            "type": "object",
            "properties": {
              "Analysis1": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string"
                  },
                  "code": {
                    "type": "string"
                  },
                  "entryNum": {
                    "type": "string"
                  }
                }
              },
              "Analysis2": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string"
                  },
                  "code": {
                    "type": "string"
                  },
                  "entryNum": {
                    "type": "string"
                  }
                }
              }
            }
          },
          "emailAddress": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      }
    }
  }
}
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "message": "Correct query"
}
Response  220
HideShow

If the token is expired or invalid

Headers
Content-Type: application/json
Body
{
  "message": "Incorrect authentication",
  "error": true
}
Response  221
HideShow

If the user with which the token was registered is no longer active in SunPlusXtra

Headers
Content-Type: application/json
Body
{
  "message": "SPX user not found",
  "error": true
}
Response  201
HideShow

Other error messages defined in the table codes

Headers
Content-Type: application/json
Body
{
  "message": "Incorrect query",
  "description": "ERROR_MESSAGE",
  "code": "ERROR_CODE",
  "error": true
}

Delete Address
DELETE/address/{addressCode}

Method to retrieve the list of addresses

Table codes, Error code list

Code Description
201 Error returned by SunPlus
202 Connection error to SunPlus
203 Response error or invalid parameters

Example URI

DELETE https://gateway.iadnet.org/api/spxtra/address/addressCode
URI Parameters
HideShow
addressCode
string (required) 

The code of the address to be deleted

Request
HideShow
Headers
Content-Type: application/json
Accept: application/json
Authorization: bearer {{TOKEN_OBTAINED_FROM_LOGIN}}
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "message": "Correct query"
}
Response  220
HideShow

If the token is expired or invalid

Headers
Content-Type: application/json
Body
{
  "message": "Incorrect authentication",
  "error": true
}
Response  221
HideShow

If the user with which the token was registered is no longer active in SunPlusXtra

Headers
Content-Type: application/json
Body
{
  "message": "SPX user not found",
  "error": true
}
Response  201
HideShow

Other error messages defined in the table codes

Headers
Content-Type: application/json
Body
{
  "message": "Incorrect query",
  "description": "ERROR_MESSAGE",
  "code": "ERROR_CODE",
  "error": true
}

Cash Cutting

Resources available to obtain the statement of account of an accounting account

Cash Cutting
POST/cash-count

Method to queries the account statement of a accounting account, allowing the use of certain filters, through the SunPlusXtra API.

Table codes, Error code list

Code Description
201 Error Incorrect data
202 Connection error to SunPlus
203 Response error or invalid parameters
206 Account and/or Empty Initial Date(s)

Example URI

POST https://gateway.iadnet.org/api/spxtra/cash-count
Request
HideShow
Headers
Content-Type: application/json
Accept: application/json
Authorization: bearer {{TOKEN_OBTAINED_FROM_LOGIN}}
Body
{
  "account": "101110",
  "startDate": "2018-06-30",
  "endDate": "2018-06-30"
}
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "message": "Successfully uploaded",
  "response": [
    {
      "allocRef": 4,
      "allocation": "C",
      "analT0": "",
      "analT1": "",
      "analT2": "",
      "analT3": "",
      "analT4": "",
      "analT5": "",
      "analT6": "",
      "analT7": "",
      "analT8": "",
      "analT9": "",
      "description": "Cash closing",
      "journalLine": 2,
      "journalNo": 54321,
      "period": 2018006,
      "transDateTime": "2018-06-30"
    },
    {
      "allocRef": 4,
      "allocation": "C",
      "analT0": "",
      "analT1": "",
      "analT2": "",
      "analT3": "",
      "analT4": "",
      "analT5": "",
      "analT6": "",
      "analT7": "",
      "analT8": "",
      "analT9": "",
      "description": "Cash closing",
      "journalLine": 2,
      "journalNo": 54321,
      "period": 2018006,
      "transDateTime": "2018-06-30"
    }
  ]
}
Schema
{
  "type": "object",
  "properties": {
    "message": {
      "type": "string"
    },
    "response": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "allocRef": {
            "type": "integer"
          },
          "allocation": {
            "type": "string"
          },
          "analT0": {
            "type": "string"
          },
          "analT1": {
            "type": "string"
          },
          "analT2": {
            "type": "string"
          },
          "analT3": {
            "type": "string"
          },
          "analT4": {
            "type": "string"
          },
          "analT5": {
            "type": "string"
          },
          "analT6": {
            "type": "string"
          },
          "analT7": {
            "type": "string"
          },
          "analT8": {
            "type": "string"
          },
          "analT9": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "journalLine": {
            "type": "integer"
          },
          "journalNo": {
            "type": "integer"
          },
          "period": {
            "type": "integer",
            "format": "yyyy'0mm"
          },
          "transDateTime": {
            "type": "string",
            "format": "yyyy-mm-dd"
          }
        }
      }
    }
  }
}
Response  220
HideShow

If the token is expired or invalid

Headers
Content-Type: application/json
Body
{
  "message": "Incorrect authentication",
  "error": true
}
Response  221
HideShow

If the user with which the token was registered is no longer active in SunPlusXtra

Headers
Content-Type: application/json
Body
{
  "message": "SPX user not found",
  "error": true
}
Response  201
HideShow

Other error messages defined in the table codes

Headers
Content-Type: application/json
Body
{
  "message": "Incorrect query",
  "description": "ERROR_MESSAGE",
  "code": "ERROR_CODE",
  "error": true
}

Ledger Definition

Resources available that allow obtaining information on open and active periods

Ledger Definition
GET/ledger-definition

Method to obtain the information of the open and active periods in SunPlus, through the SunPlusXtra API.

Table codes, Error code list

Code Description
202 Error in the information sent
203 Response error or invalid parameters
206 No data found

Example URI

GET https://gateway.iadnet.org/api/spxtra/ledger-definition
Request
HideShow
Headers
Content-Type: application/json
Accept: application/json
Authorization: bearer {{TOKEN_OBTAINED_FROM_LOGIN}}
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "message": "Correct query",
  "response": {
    "currentPeriod": "2018006",
    "fromPeriod": "2018001 ",
    "toPeriod": "2020012 "
  }
}
Response  220
HideShow

If the token is expired or invalid

Headers
Content-Type: application/json
Body
{
  "message": "Incorrect authentication",
  "error": true
}
Response  221
HideShow

If the user with which the token was registered is no longer active in SunPlusXtra

Headers
Content-Type: application/json
Body
{
  "message": "SPX user not found",
  "error": true
}
Response  201
HideShow

Other error messages defined in the table codes

Headers
Content-Type: application/json
Body
{
  "message": "Incorrect query",
  "description": "ERROR_MESSAGE",
  "code": "ERROR_CODE",
  "error": true
}

Genealogy

Resource available to obtain the genealogy list of the unions

Genealogy
GET/genealogy

Method to obtain the information of the companies that are underneath the SunPlusXtra user structure.

Table codes, Error code list

Code Description
203 Response error or invalid parameters

Example URI

GET https://gateway.iadnet.org/api/spxtra/genealogy
Request
HideShow
Headers
Content-Type: application/json
Accept: application/json
Authorization: bearer {{TOKEN_OBTAINED_FROM_LOGIN}}
Response  200
HideShow
Headers
Content-Type: application/json
Body
"message": "Correct query",
    "response": [
        {
            "_key": "13472430",
            "parentCompany": {
                "_key": "1296709",
                "id": 11,
                "name": "K11 Interoceanica",
                "businessName": "IGLESIA ADVENTISTA DEL SEPTIMO DIA UNION INTEROCEANICA AR",
                "type": "company",
                "lastCompany": false
            },
            "subsidiaryCompany": {
                "_key": "1296809",
                "id": 31,
                "name": "D11 Alpina",
                "businessName": "Iglesia Adventista del Septimo Dia Seccion Alpina AR",
                "type": "company",
                "lastCompany": false
            },
            "idFrom": 11,
            "idTo": 31
        },
        {
            "_key": "24442525",
            "parentCompany": {
                "_key": "1296709",
                "id": 11,
                "name": "K11 Interoceanica",
                "businessName": "IGLESIA ADVENTISTA DEL SEPTIMO DIA UNION INTEROCEANICA AR",
                "type": "company",
                "lastCompany": false
            },
            "subsidiaryCompany": {
                "_key": "24442523",
                "id": 72,
                "name": "FEHV Filantrópica Hidalgo Veracruzana",
                "businessName": "Filantrópica y Educativa Hidalgo Veracruzana AC",
                "type": "company",
                "lastCompany": null
            },
            "idFrom": 11,
            "idTo": 72
        },
        {
            "_key": "29152942",
            "parentCompany": {
                "_key": "1296709",
                "id": 11,
                "name": "K11 Interoceanica",
                "businessName": "IGLESIA ADVENTISTA DEL SEPTIMO DIA UNION INTEROCEANICA AR",
                "type": "company",
                "lastCompany": false
            },
            "subsidiaryCompany": {
                "_key": "24410923",
                "id": 71,
                "name": "FEI Filantrópica del Istmo",
                "businessName": "Filantrópica y Educativa del Istmo AC",
                "type": "company",
                "lastCompany": null
            },
            "idFrom": 11,
            "idTo": 71
        },
        {
            "_key": "24443373",
            "parentCompany": {
                "_key": "1296709",
                "id": 11,
                "name": "K11 Interoceanica",
                "businessName": "IGLESIA ADVENTISTA DEL SEPTIMO DIA UNION INTEROCEANICA AR",
                "type": "company",
                "lastCompany": false
            },
            "subsidiaryCompany": {
                "_key": "24443371",
                "id": 73,
                "name": "FEOAC  Filantrópica de Oaxaca",
                "businessName": "Filantópica y Educativa Oaxaca AC",
                "type": "company",
                "lastCompany": null
            },
            "idFrom": 11,
            "idTo": 73
        },
        {
            "_key": "29157908",
            "parentCompany": {
                "_key": "1296709",
                "id": 11,
                "name": "K11 Interoceanica",
                "businessName": "IGLESIA ADVENTISTA DEL SEPTIMO DIA UNION INTEROCEANICA AR",
                "type": "company",
                "lastCompany": false
            },
            "subsidiaryCompany": {
                "_key": "24443971",
                "id": 74,
                "name": "FEOAC Filantrópica Olmeca",
                "businessName": "Filantrópica y Educativa Olmeca AC",
                "type": "company",
                "lastCompany": null
            },
            "idFrom": 11,
            "idTo": 74
        },

    ]
}
Response  220
HideShow

If the token is expired or invalid

Headers
Content-Type: application/json
Body
{
  "message": "Incorrect authentication",
  "error": true
}
Response  221
HideShow

If the user with which the token was registered is no longer active in SunPlusXtra

Headers
Content-Type: application/json
Body
{
  "message": "SPX user not found",
  "error": true
}
Response  201
HideShow

Other error messages defined in the table codes

Headers
Content-Type: application/json
Body
{
  "message": "Incorrect query",
  "description": "ERROR_MESSAGE",
  "code": "ERROR_CODE",
  "error": true
}

APS SPXtra API

The token obtained in the /login request should be placed in the header of each subsequent method.

Below is an example:

Authorization: bearer 5262d64b892e8d4341000001

GROUPS

Resources available for obtaining and modifying employee data

Employee groups
GET/employee-group/{payrollId}{?search}

Method to obtain employee groups. Resources available for accessing notification information

Table status

Status Description
1 Pending
4 Rejected
6 Accounted

Table codes, Error code list

Code Description
202 Error in the data obtained
203 Error in the data obtained
206 The parameters sent are invalid

Example URI

GET https://gateway.iadnet.org/api/spxtra/employee-group/27?search=%
URI Parameters
HideShow
payrollId
number (required) Example: 27

This value is obtained in SunPlusXtra, in the payroll configuration section

search
string (optional) Example: %

Parameter to indicate the filter of the groups to consult

Request
HideShow
Headers
Content-Type: application/json
Accept: application/json
Authorization: bearer {{TOKEN_OBTAINED_FROM_LOGIN}}
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "message": "Correct query",
  "response": [
    {
      "id": 29,
      "policyId": 751908,
      "journalNo": 9993,
      "policyDetailId": 4999598,
      "originCompany": "W11 - Unión Sureste",
      "originCompanyId": 97,
      "transaction": "Crédito",
      "destinationCompany": "IAN Iglesia Adventista Nacional",
      "amount": "18630.00",
      "originAccount": null,
      "destinationAccount": null,
      "rejectionReason": null,
      "statusId": 1,
      "line": 2,
      "period": "2022007",
      "journal": null,
      "policyDetail": null,
      "accountingPolicyId": null
    },
    {
      "id": 30,
      "policyId": 752159,
      "journalNo": 9996,
      "policyDetailId": 5001604,
      "originCompany": "W11 - Unión Sureste",
      "originCompanyId": 97,
      "transaction": "Crédito",
      "destinationCompany": "IAN Iglesia Adventista Nacional",
      "amount": "7695.00",
      "originAccount": null,
      "destinationAccount": null,
      "rejectionReason": null,
      "statusId": 1,
      "line": 9,
      "period": "2022007",
      "journal": null,
      "policyDetail": null,
      "accountingPolicyId": null
    }
  ]
}
Response  220
HideShow

If the token is expired or invalid

Headers
Content-Type: application/json
Body
{
  "message": "Incorrect authentication",
  "error": true
}
Response  221
HideShow

If the user with which the token was registered is no longer active in SunPlusXtra

Headers
Content-Type: application/json
Body
{
  "message": "SPX user not found",
  "error": true
}
Response  201
HideShow

Other error messages defined in the table codes

Headers
Content-Type: application/json
Body
{
  "message": "Incorrect query",
  "description": "ERROR_MESSAGE",
  "code": "ERROR_CODE",
  "error": true
}

Maintenance groups
GET/allowance-group/{payrollId}

Method to obtain employee groups. Resources available for accessing notification information

Table codes, Error code list

Code Description
202 Error in the data obtained
203 Error in the data obtained
206 The parameters sent are invalid

Example URI

GET https://gateway.iadnet.org/api/spxtra/allowance-group/27
URI Parameters
HideShow
payrollId
number (required) Example: 27

This value is obtained in SunPlusXtra, in the payroll configuration section

Request
HideShow
Headers
Content-Type: application/json
Accept: application/json
Authorization: bearer {{TOKEN_OBTAINED_FROM_LOGIN}}
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "message": "Correct query",
  "response": [
    {
      "code": "4902",
      "idAllowance": 11553,
      "name": "Group B"
    },
    {
      "code": "4901",
      "idAllowance": 11562,
      "name": "Group A"
    },
    {
      "code": "4903",
      "idAllowance": 11567,
      "name": "Group C"
    },
    {
      "code": "4904",
      "idAllowance": 11568,
      "name": "Group D"
    },
    {
      "code": "4905",
      "idAllowance": 11569,
      "name": "Group E"
    },
    {
      "code": "4906",
      "idAllowance": 11638,
      "name": "Contracts"
    }
  ]
}
Response  220
HideShow

If the token is expired or invalid

Headers
Content-Type: application/json
Body
{
  "message": "Incorrect authentication",
  "error": true
}
Response  221
HideShow

If the user with which the token was registered is no longer active in SunPlusXtra

Headers
Content-Type: application/json
Body
{
  "message": "SPX user not found",
  "error": true
}
Response  201
HideShow

Other error messages defined in the table codes

Headers
Content-Type: application/json
Body
{
  "message": "Incorrect query",
  "description": "ERROR_MESSAGE",
  "code": "ERROR_CODE",
  "error": true
}

EMPLOYEES

Resources available to obtain and modify employee data

Employees
GET/employee/{payrollId}/{enrollmentCode}

Method of obtaining employee data.

Table codes, Error code list

Code Description
202 Error in the data obtained
203 Error in the data obtained
206 The parameters sent are invalid

Example URI

GET https://gateway.iadnet.org/api/spxtra/employee/27/ER00000
URI Parameters
HideShow
payrollId
number (required) Example: 27

This value is obtained in SunPlusXtra, in the payroll configuration section

enrollmentCode
string (required) Example: ER00000

Parameter to indicate the employee code to query

Request
HideShow
Headers
Content-Type: application/json
Accept: application/json
Authorization: bearer {{TOKEN_OBTAINED_FROM_LOGIN}}
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "message": "Correct query",
  "response": [
    {
      "active": true,
      "curp": "CODL680126MVZHMD05",
      "enrollmentCode": "ERCHOLU01",
      "groupCode": "2",
      "groupName": "EDU-Contrato",
      "name": "CHONG DOMÍNGUEZ, LUCINA",
      "rfc": "CODL680126BF4"
    }
  ]
}
Response  220
HideShow

If the token is expired or invalid

Headers
Content-Type: application/json
Body
{
  "message": "Incorrect authentication",
  "error": true
}
Response  221
HideShow

If the user with which the token was registered is no longer active in SunPlusXtra

Headers
Content-Type: application/json
Body
{
  "message": "SPX user not found",
  "error": true
}
Response  201
HideShow

Other error messages defined in the table codes

Headers
Content-Type: application/json
Body
{
  "message": "Incorrect query",
  "description": "ERROR_MESSAGE",
  "code": "ERROR_CODE",
  "error": true
}

Employees by name
GET/employee/{payrollId}{?search}

Method of obtaining employee data.

Table codes, Error code list

Code Description
202 Error in the data obtained
203 Error in the data obtained
206 The parameters sent are invalid

Example URI

GET https://gateway.iadnet.org/api/spxtra/employee/27?search=%
URI Parameters
HideShow
payrollId
number (required) Example: 27

This value is obtained in SunPlusXtra, in the payroll configuration section

search
string (optional) Example: %

Parameter to indicate the filter of employees to consult by name

Request
HideShow
Headers
Content-Type: application/json
Accept: application/json
Authorization: bearer {{TOKEN_OBTAINED_FROM_LOGIN}}
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "message": "Correct query",
  "response": [
    {
      "active": null,
      "curp": null,
      "enrollmentCode": "ERCRUNE01",
      "funcion": "AUCONTA01",
      "fund": "10",
      "groupCode": null,
      "groupName": null,
      "idAllowance": 11553,
      "idEmployee": 222558,
      "idEnrollment": 119166,
      "job": "Accounting Assistant",
      "name": "NEFTALI CRUZ ESCOBAR",
      "rfc": null
    }
  ]
}
Response  220
HideShow

If the token is expired or invalid

Headers
Content-Type: application/json
Body
{
  "message": "Incorrect authentication",
  "error": true
}
Response  221
HideShow

If the user with which the token was registered is no longer active in SunPlusXtra

Headers
Content-Type: application/json
Body
{
  "message": "SPX user not found",
  "error": true
}
Response  201
HideShow

Other error messages defined in the table codes

Headers
Content-Type: application/json
Body
{
  "message": "Incorrect query",
  "description": "ERROR_MESSAGE",
  "code": "ERROR_CODE",
  "error": true
}

Update Employee
PUT/employee/{payrollId}/{enrollmentCode}

Method to activate an employee who was inactive.

Table codes, Error code list

Code Description
202 Error in the data obtained
203 Error in the data obtained
206 The parameters sent are invalid

Example URI

PUT https://gateway.iadnet.org/api/spxtra/employee/27/ER00000
URI Parameters
HideShow
payrollId
number (required) Example: 27

This value is obtained in SunPlusXtra, in the payroll configuration section

enrollmentCode
string (required) Example: ER00000

Parameter to indicate the employee code to query

Request
HideShow
Headers
Content-Type: application/json
Accept: application/json
Authorization: bearer {{TOKEN_OBTAINED_FROM_LOGIN}}
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "message": "Correct query",
  "response": [
    {
      "active": true,
      "curp": "CODL680126MVZHMD05",
      "enrollmentCode": "ERCHOLU01",
      "groupCode": "2",
      "groupName": "EDU-Contract",
      "name": "CHONG DOMÍNGUEZ, LUCINA",
      "rfc": "CODL680126BF4"
    }
  ]
}
Response  220
HideShow

If the token is expired or invalid

Headers
Content-Type: application/json
Body
{
  "message": "Incorrect authentication",
  "error": true
}
Response  221
HideShow

If the user with which the token was registered is no longer active in SunPlusXtra

Headers
Content-Type: application/json
Body
{
  "message": "SPX user not found",
  "error": true
}
Response  201
HideShow

Other error messages defined in the table codes

Headers
Content-Type: application/json
Body
{
  "message": "Incorrect query",
  "description": "ERROR_MESSAGE",
  "code": "ERROR_CODE",
  "error": true
}

SPXtra API expenses

The token obtained in the /login request should be placed in the header of each subsequent method.

Below is an example:

Authorization: bearer 5262d64b892e8d4341000001

BUDGET

Resources available to obtain budget information

Budget Balance
GET/budget/balance{?account,startPeriod,endPeriod,fund,function,who}

Resources available to obtain the balance and budget of an account with the given parameters

Table codes, Error code list

Code Description
202 Error in the data obtained
203 Error data not found, according to the information provided
206 Error of information received, incorrect data

Example URI

GET https://gateway.iadnet.org/api/spxtra/budget/balance?account=101110&startPeriod=2024001&endPeriod=2024001&fund=10&function=10&who=*
URI Parameters
HideShow
account
string (required) Example: 101110

Parameter to indicate the account code to query

startPeriod
string (required) Example: 2024001

Format: ‘yyyy0mm’ Parameter to indicate the start period for the calculation

endPeriod
string (required) Example: 2024001

Format: ‘yyyy0mm’ Parameter to indicate the end period for the calculation

fund
string (optional) Example: 10

Parameter to indicate the fund code to query

function
string (optional) Example: 10

Parameter to indicate the code of the function to consult

who
string (optional) Example: *

Parameter to indicate the code of the WHO to query

Request
HideShow
Headers
Content-Type: application/json
Accept: application/json
Authorization: bearer {{TOKEN_OBTAINED_FROM_LOGIN}}
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "message": "Correct query",
  "response": [
    {
      "accountCode": "101110",
      "period": "2018006",
      "amount": -64901.6,
      "credit": 12541,
      "debit": 3212,
      "budget": 44121,
      "analT0": "",
      "analT1": "",
      "analT2": "10",
      "analT3": "",
      "analT4": "",
      "analT5": "",
      "analT6": "",
      "analT7": "",
      "analT8": "",
      "analT9": ""
    },
    {
      "accountCode": "101110",
      "period": "2018006",
      "amount": 94719341.11,
      "credit": 54552,
      "debit": 87845,
      "budget": 6533,
      "analT0": "",
      "analT1": "",
      "analT2": "10",
      "analT3": "",
      "analT4": "",
      "analT5": "",
      "analT6": "",
      "analT7": "",
      "analT8": "",
      "analT9": ""
    },
    {
      "accountCode": "101110",
      "period": "2018006",
      "amount": -369,
      "credit": 15,
      "debit": 874,
      "budget": 1125,
      "analT0": "",
      "analT1": "",
      "analT2": "20",
      "analT3": "",
      "analT4": "",
      "analT5": "",
      "analT6": "",
      "analT7": "",
      "analT8": "",
      "analT9": ""
    }
  ]
}
Schema
{
    "type": "object",
    "properties": {
        "message": {
            "type": "string"
        },
        "response": {
        "type": "array",
        "items": [
            {
            "type": "object",
            "properties": {
                "accountCode": {
                    "type": "string"
                },
                "period": {
                    "type": "string"
                },
                "amount": {
                    "type": "number"
                },
                "credit": {
                    "type": "number"
                },
                "debit": {
                    "type": "number"
                },
                "budget": {
                    type": "number"
                },
                "analT0": {
                    "type": "string"
                },
                "analT1": {
                    "type": "string"
                },
                "analT2": {
                    "type": "string"
                },
                "analT3": {
                    "type": "string"
                },
                "analT4": {
                    "type": "string"
                },
                "analT5": {
                    "type": "string"
                },
                "analT6": {
                    "type": "string"
                },
                "analT7": {
                    "type": "string"
                },
                "analT8": {
                    "type": "string"
                },
                "analT9": {
                    "type": "string"
                }
            }
            },
            {
            "type": "object",
            "properties": {
                "accountCode": {
                    "type": "string"
                },
                "period": {
                    "type": "string"
                },
                "amount": {
                    "type": "number"
                },
                "credit": {
                    "type": "number"
                },
                "debit": {
                    "type": "number"
                },
                "budget": {
                    "type": "number"
                },
                "analT0": {
                    "type": "string"
                },
                "analT1": {
                    "type": "string"
                },
                "analT2": {
                    "type": "string"
                },
                "analT3": {
                    "type": "string"
                },
                "analT4": {
                    "type": "string"
                },
                "analT5": {
                    "type": "string"
                },
                "analT6": {
                    "type": "string"
                },
                "analT7": {
                    "type": "string"
                },
                "analT8": {
                    "type": "string"
                },
                "analT9": {
                    "type": "string"
                }
            }
            },
            {
            "type": "object",
            "properties": {
                "accountCode": {
                    "type": "string"
                },
                "period": {
                    "type": "string"
                },
                "amount": {
                    "type": "number"
                },
                "credit": {
                    "type": "number"
                },
                "debit": {
                    "type": "number"
                },
                "budget": {
                    "type": "number"
                },
                "analT0": {
                    "type": "string"
                },
                "analT1": {
                    "type": "string"
                },
                "analT2": {
                    "type": "string"
                },
                "analT3": {
                    "type": "string"
                },
                "analT4": {
                    "type": "string"
                },
                "analT5": {
                    "type": "string"
                },
                "analT6": {
                    "type": "string"
                },
                "analT7": {
                    "type": "string"
                },
                "analT8": {
                    "type": "string"
                },
                "analT9": {
                    "type": "string"
                }
            }
            }
        ]
        }
    }
}
Response  220
HideShow

If the token is expired or invalid

Headers
Content-Type: application/json
Body
{
  "message": "Incorrect authentication",
  "error": true
}
Response  221
HideShow

If the user with which the token was registered is no longer active in SunPlusXtra

Headers
Content-Type: application/json
Body
{
  "message": "SPX user not found",
  "error": true
}
Response  201
HideShow

Other error messages defined in the table codes

Headers
Content-Type: application/json
Body
{
  "message": "Incorrect query",
  "description": "ERROR_MESSAGE",
  "code": "ERROR_CODE",
  "error": true
}

Annual Budget
GET/budget/annual{?journalNo,function}

Resources available to obtain the annual budget according to the given journal and the specified function.

Table codes, Error code list

Code Description
202 Error in the data obtained
203 Error data not found, according to the information provided
206 Error of information received, incorrect data

Example URI

GET https://gateway.iadnet.org/api/spxtra/budget/annual?journalNo=5786&function=10
URI Parameters
HideShow
journalNo
string (required) Example: 5786

Parameter to indicate the journal number to query

function
string (optional) Example: 10

Parameter to indicate the code of the function to query

Request
HideShow
Headers
Content-Type: application/json
Accept: application/json
Authorization: bearer {{TOKEN_OBTAINED_FROM_LOGIN}}
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "message": "Correct query",
  "response": 1120.05
}
Schema
{
  "type": "object",
  "properties": {
    "message": {
      "type": "string"
    },
    "response": {
      "type": "number"
    }
  }
}
Response  220
HideShow

If the token is expired or invalid

Headers
Content-Type: application/json
Body
{
  "message": "Incorrect authentication",
  "error": true
}
Response  221
HideShow

If the user with which the token was registered is no longer active in SunPlusXtra

Headers
Content-Type: application/json
Body
{
  "message": "SPX user not found",
  "error": true
}
Response  201
HideShow

Other error messages defined in the table codes

Headers
Content-Type: application/json
Body
{
  "message": "Incorrect query",
  "description": "ERROR_MESSAGE",
  "code": "ERROR_CODE",
  "error": true
}

Annual Budget Used
GET/budget/annual-used

Resources available to obtain the annual budget used based on the query parameters: startPeriod, endPeriod, function, and projects.

Table codes, Error code list

Code Description
202 Error in the data obtained
203 Error data not found, according to the information provided
206 Error of information received, incorrect data

Example URI

GET https://gateway.iadnet.org/api/spxtra/budget/annual-used
Request
HideShow
Headers
Content-Type: application/json
Accept: application/json
Authorization: bearer {{TOKEN_OBTAINED_FROM_LOGIN}}
Body
{
  "startPeriod": "2024001",
  "endPeriod": "2024002",
  "function": "10",
  "projects": [
    "P1-RECLAMOS ARM",
    "*"
  ]
}
Schema
{
  "type": "object",
  "properties": {
    "startPeriod": {
      "type": "string",
      "format": "yyyy0mm"
    },
    "endPeriod": {
      "type": "string",
      "format": "yyyy0mm"
    },
    "function": {
      "type": "string"
    },
    "projects": {
      "type": "array",
      "items": {
        "type": "string"
      }
    }
  }
}
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "message": "Correct query",
  "response": 1120.05
}
Schema
{
  "type": "object",
  "properties": {
    "message": {
      "type": "string"
    },
    "response": {
      "type": "number"
    }
  }
}
Response  220
HideShow

If the token is expired or invalid

Headers
Content-Type: application/json
Body
{
  "message": "Incorrect authentication",
  "error": true
}
Response  221
HideShow

If the user with which the token was registered is no longer active in SunPlusXtra

Headers
Content-Type: application/json
Body
{
  "message": "SPX user not found",
  "error": true
}
Response  201
HideShow

Other error messages defined in the table codes

Headers
Content-Type: application/json
Body
{
  "message": "Incorrect query",
  "description": "ERROR_MESSAGE",
  "code": "ERROR_CODE",
  "error": true
}

Monthly Budget
GET/budget/monthly{?journalNo,function}

Resources available to obtain the monthly budget according to the given journal and specified function

Table codes, Error code list

Code Description
202 Error in the data obtained
203 Error data not found, according to the information provided
206 Error of information received, incorrect data

Example URI

GET https://gateway.iadnet.org/api/spxtra/budget/monthly?journalNo=5786&function=10
URI Parameters
HideShow
journalNo
string (required) Example: 5786

Parameter to indicate the journal number to query

function
string (optional) Example: 10

Parameter to indicate the code of the function to query

Request
HideShow
Headers
Content-Type: application/json
Accept: application/json
Authorization: bearer {{TOKEN_OBTAINED_FROM_LOGIN}}
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "message": "Correct query",
  "response": [
    {
      "amount": 24287,
      "period": 2018010
    }
  ]
}
Schema
{
  "type": "object",
  "properties": {
    "message": {
      "type": "string"
    },
    "response": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "amount": {
            "type": "number"
          },
          "period": {
            "type": "integer"
          }
        }
      }
    }
  }
}
Response  220
HideShow

If the token is expired or invalid

Headers
Content-Type: application/json
Body
{
  "message": "Incorrect authentication",
  "error": true
}
Response  221
HideShow

If the user with which the token was registered is no longer active in SunPlusXtra

Headers
Content-Type: application/json
Body
{
  "message": "SPX user not found",
  "error": true
}
Response  201
HideShow

Other error messages defined in the table codes

Headers
Content-Type: application/json
Body
{
  "message": "Incorrect query",
  "description": "ERROR_MESSAGE",
  "code": "ERROR_CODE",
  "error": true
}

Monthly Budget Used
GET/budget/monthly-used

Resources available to obtain the monthly budget used based on the query parameters: startPeriod, endPeriod, function, and projects.

Table codes, Error code list

Code Description
202 Error in the data obtained
203 Error data not found, according to the information provided
206 Error of information received, incorrect data

Example URI

GET https://gateway.iadnet.org/api/spxtra/budget/monthly-used
Request
HideShow
Headers
Content-Type: application/json
Accept: application/json
Authorization: bearer {{TOKEN_OBTAINED_FROM_LOGIN}}
Body
{
  "startPeriod": "2024001",
  "endPeriod": "2024002",
  "function": "10",
  "projects": [
    "P1-RECLAMOS ARM",
    "*"
  ]
}
Schema
{
  "type": "object",
  "properties": {
    "startPeriod": {
      "type": "string",
      "format": "yyyy0mm"
    },
    "endPeriod": {
      "type": "string",
      "format": "yyyy0mm"
    },
    "function": {
      "type": "string"
    },
    "projects": {
      "type": "array",
      "items": {
        "type": "string"
      }
    }
  }
}
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
    "message": "Correct query",
    "response": [
        {
            "amount": 11362,
            "period": 2018009
        },
        {
            "amount": 1528,
            "period": 2018010
        },
        {
            "amount": 16252,
            "period": 2018011
        },
        {
            "amount": 9762,
            "period": 2018012
        },
    ]
}
Schema
{
    "type": "object",
    "properties": {
        "message": {
            "type": "string"
        },
        "response": {
            "type": "array",
            "items": [
                {
                    "type": "object",
                    "properties": {
                        "amount": {
                            "type": "integer"
                        },
                        "period": {
                            "type": "integer"
                        }
                    }
                },
                {
                    "type": "object",
                    "properties": {
                        "amount": {
                            "type": "integer"
                        },
                        "period": {
                            "type": "integer"
                        }
                    }
                },
                {
                    "type": "object",
                    "properties": {
                        "amount": {
                            "type": "integer"
                        },
                        "period": {
                            "type": "integer"
                        }
                    }
                },
                {
                    "type": "object",
                    "properties": {
                        "amount": {
                            "type": "integer"
                        },
                        "period": {
                            "type": "integer"
                        }
                    }
                }
            ]
        }
    }
}
Response  220
HideShow

If the token is expired or invalid

Headers
Content-Type: application/json
Body
{
  "message": "Incorrect authentication",
  "error": true
}
Response  221
HideShow

If the user with which the token was registered is no longer active in SunPlusXtra

Headers
Content-Type: application/json
Body
{
  "message": "SPX user not found",
  "error": true
}
Response  201
HideShow

Other error messages defined in the table codes

Headers
Content-Type: application/json
Body
{
  "message": "Incorrect query",
  "description": "ERROR_MESSAGE",
  "code": "ERROR_CODE",
  "error": true
}

Journal Period
GET/budget/journal-period

Resources available to obtain the list of journal periods where accounting entries can be made.

Table codes, Error code list

Code Description
202 Error in the data obtained
203 Error data not found, according to the information provided
206 Error of information received, incorrect data

Example URI

GET https://gateway.iadnet.org/api/spxtra/budget/journal-period
Request
HideShow
Headers
Content-Type: application/json
Accept: application/json
Authorization: bearer {{TOKEN_OBTAINED_FROM_LOGIN}}
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "message": "Correct query",
  "response": [
    2018001,
    2018002,
    2018003,
    2018004,
    2018005,
    2018006,
    2018007,
    2018008,
    2018009,
    2018010,
    2018011,
    2018012,
    2019001,
    2019002,
    2019003,
    2019004,
    2019005,
    2019006
  ]
}
Schema
{
  "type": "object",
  "properties": {
    "message": {
      "type": "string"
    },
    "response": {
      "type": "array",
      "items": {
        "type": "integer"
      }
    }
  }
}
Response  220
HideShow

If the token is expired or invalid

Headers
Content-Type: application/json
Body
{
  "message": "Incorrect authentication",
  "error": true
}
Response  221
HideShow

If the user with which the token was registered is no longer active in SunPlusXtra

Headers
Content-Type: application/json
Body
{
  "message": "SPX user not found",
  "error": true
}
Response  201
HideShow

Other error messages defined in the table codes

Headers
Content-Type: application/json
Body
{
  "message": "Incorrect query",
  "description": "ERROR_MESSAGE",
  "code": "ERROR_CODE",
  "error": true
}

Documents SPXtra API

The token obtained in the /login request should be placed in the header of each subsequent method.

Below is an example:

Authorization: bearer 5262d64b892e8d4341000001

EDOCS

Resources available to upload and modify documents linked to journals

Link Documents
POST/edocs

Method to link documents to journals. Resources available to link documents using the journal number and/or line.

Table codes, Error code list

Code Description
203 An error occurred while processing the request
204 The journal number or line does not exist
205 The linking path is not available
206 Invalid data error

To consult the parameters used in this request, refer to the following table:

Table parameters, Parameter list

Parameters Type Description Required
journalNumber Numeric Journal number Mandatory
lineNumber Numeric Journal line Optional
file File File to link Mandatory
private Boolean Defines if it is a private file Mandatory

Note: The maximum file size is 40MB, and the allowed formats are IMG, JPG, PNG, PDF, DOC, DOCX, XLS, XLSX, PPT, PPTX, and ZIP.

Example URI

POST https://gateway.iadnet.org/api/spxtra/edocs
Request
HideShow
Headers
Content-Type: multipart/form-data
Accept: multipart/form-data
Authorization: bearer {{TOKEN_OBTAINED_FROM_LOGIN}}
Body
Content-Disposition: form-data; name="journalNumber"
Content-Disposition: form-data; name="lineNumber"

Content-Disposition: form-data; name="file"; filename="file.pdf"
Content-Type: application/pdf

Content-Disposition: form-data; name="private"
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "message": "The document has been successfully linked",
  "fileKey": "1746602768625"
}
Response  220
HideShow

If the token is expired or invalid

Headers
Content-Type: application/json
Body
{
  "message": "Incorrect authentication",
  "error": true
}
Response  221
HideShow

If the user with which the token was registered is no longer active in SunPlusXtra

Headers
Content-Type: application/json
Body
{
  "message": "SPX user not found",
  "error": true
}
Response  201
HideShow

Other error messages defined in the table codes

Headers
Content-Type: application/json
Body
{
  "message": "Incorrect query",
  "description": "ERROR_MESSAGE",
  "code": "ERROR_CODE",
  "error": true
}

Delete Documents
DELETE/edocs

Method to delete documents from journals. Resources available to delete and unlink documents using the journal number and/or line.

Table codes, Error code list

Code Description
203 An error occurred while processing the request
204 The journal number or line does not exist
205 The linking path is not available
206 The file was not found

To consult the parameters used in this request, refer to the following table:

Table parameters, Parameter list

Parameters Type Description Required
journalNumber Numeric Journal number Mandatory
lineNumber Numeric Journal line Optional
fileKey Text Key of the linked file Mandatory
fileExtension Text Extension of the uploaded file Mandatory

Example URI

DELETE https://gateway.iadnet.org/api/spxtra/edocs
Request
HideShow
Headers
Content-Type: application/json
Accept: application/json
Authorization: bearer {{TOKEN_OBTAINED_FROM_LOGIN}}
Body
{
  "journalNumber": 1258,
  "lineNumber": 1,
  "fileKey": "1746577799187",
  "fileExtension": "png"
}
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "message": "The document has been successfully deleted"
}
Response  220
HideShow

If the token is expired or invalid

Headers
Content-Type: application/json
Body
{
  "message": "Incorrect authentication",
  "error": true
}
Response  221
HideShow

If the user with which the token was registered is no longer active in SunPlusXtra

Headers
Content-Type: application/json
Body
{
  "message": "SPX user not found",
  "error": true
}
Response  201
HideShow

Other error messages defined in the table codes

Headers
Content-Type: application/json
Body
{
    "message" : "Incorrect query",
    "description" : "ERROR_MESSAGE",
    "code" : "ERROR_CODE",
    "error" : true
}>

Generated by Shotsware on 14 May 2025