Create Group & Company

Align your work of operation through companies and groups

Group & Company Management

Types of companies

A company represents a set of transactions and data categorized by the user. A Group represents multiple companies. However, users can choose to have the companies individually or as Group.

πŸ“˜

Companies can be listed as follows:

  • An individual company
  • Multiple individual companies
  • Companies in a Group
  • Multiple groups representing multiple companies
  • Using a combination of two or more options mentioned above

Create Group & Company Request

Endpoint details

Endpoint URLMethodAuthentication requirements
/v1/api/erp/svGrpCmpServicePOST1. clientid
2. clientsecret
3. signature

A request in the following format should be posted to the above mentioned endpoint to create a group and company:

curl --location --request POST 'https://servicesuat.onesingleview.com/v1/api/erp/svGrpCmpService' \
--header 'clientid: Enter_Client_ID' \
--header 'clientsecret: Enter_Client_Secret' \
--header 'signature: Enter_Signature' \
--header 'Content-Type: application/json' \
--data-raw '{
  "svGrpCmpServiceRQ": {
    "group": {
      "en": "Enter_Group_Name_English",
      "ar": "Enter_Group_Name_Arabic",
      "code": "Enter_Group_Code"
    },
    "company": [
      {
        "en": "Enter_Company_Name_English",
        "ar": "Enter_Company_Name_Arabic",
        "code": "Enter_Company_Code",
        "address": "Enter_Address",
        "erpService": "Enter_ERP_Service",
        "callBackPaymentStatusUrl": "Enter_Callback_Payment_Status_URL",
        "callBackPaymentChargeUrl": " Enter_Callback_Payment_Charge_URL"
      },
      {
        "en": "Enter_Company_Name_English",
        "ar": "Enter_Company_Name_Arabic",
        "code": "Enter_Company_Code",
        "address": "Enter_Address",
        "erpService": "Enter_ERP_Service",
        "callBackPaymentStatusUrl": "Enter_Callback_Payment_Status_URL",
        "callBackPaymentChargeUrl": "Enter_Callback_Payment_Charge_URL"
      }
    ]
  }
}'

Request details description:

JSON TagDescriptionData type
clientid
Mandatory
Client IDString
clientsecret
Mandatory
Client CodeString
signature
Mandatory
SignatureString
svGrpCmpServiceRQ
Mandatory
Group & Company creation request tagObject
group
Specific Mandatory
Group tagObject
en
Mandatory
Name of the Group in EnglishString
ar
Mandatory
Name of the Group in ArabicString
code
Mandatory
Unique Group codeString
company
Mandatory
Array of CompaniesArray
en
Mandatory
Name of the Company in EnglishString
ar
Mandatory
Name of the Company in ArabicString
code
Mandatory
Unique Company CodeString
address
Optional
Address of the companyString
erpService
Mandatory
Type of ERP ServiceString
callBackPaymentStatusUrl
Mandatory
Call back URL to notify payment statusString
callBackPaymentChargeUrl
Mandatory
Call back URL to notify payment chargesString

Successful Create Group & Company Response

{
  "svGrpCmpServiceRS": {
    "group": {
      "code": "Group_Code",
      "status": 0,
      "message": "Process/Status_Message",
      
    },
    "company": [
      {
        "status": 0,
        "message": "Status_Message"
      },
      {
        "code": "Company_Code",
        "status": 0,
        "message": "Process/Status_Message",
        "errorCode": "Error_Code"
      }
    ]
  }
}

Response details description:

JSON TagDescriptionData type
svGrpCmpServiceRSCreate Group & Company Response TagObject
groupGroup tagObject
codeUnique Group codeString
statusStatus CodeNumerical
messageProcess display messageString
companyArray of companiesArray
statusStatus codeNumerical
codeUnique company codeString
messageProcess display messageString
errorCodeError codeString