partnersApi documentation (1.0.0)

Download OpenAPI specification:

Documentation and interface contract for the partnersApi, the API responsible for managing legal entities (partner management).

Organizations

addOrganization

Create an organization as a business object.

header Parameters
X-Correlation-ID
string

Correlation identifier

Request Body schema: application/json
id
string

Technical and unique identifier generated automatically, which identifies an organization.

name
required
string

Partner's name.

picture
string

Link to the partner's logo.

required
object (Address)
status
string
Enum: "MISSING_INFORMATIONS" "COMPLETED"

The partner's status.

  • By default, the organization is created with the status: "MISSING_INFORMATIONS".
  • At each login, check whether the status has changed to COMPLETED, in order to notify the legal representative that they must fill in their organization's information.

Responses

Request samples

Content type
application/json
{
  • "id": "string",
  • "name": "string",
  • "picture": "string",
  • "address": {
    },
  • "status": "MISSING_INFORMATIONS"
}

Response samples

Content type
application/json
{
  • "id": "string",
  • "name": "string",
  • "picture": "string",
  • "address": {
    },
  • "status": "MISSING_INFORMATIONS"
}

listOrganizations

List organizations.

query Parameters
currentPage
integer >= 0

Current page number. Do not send this attribute on the first call.

sizePage
integer >= 3

Number of elements per page.

header Parameters
X-Correlation-ID
string

Correlation identifier

Responses

Response samples

Content type
application/json
{
  • "totalElements": 0,
  • "totalPages": 0,
  • "currentPage": 0,
  • "content": [
    ]
}

getOrganization

Retrieve organization information by its id.

path Parameters
organization-id
required
string

Technical id of the organization.

header Parameters
X-Correlation-ID
string

Correlation identifier

Responses

Response samples

Content type
application/json
{
  • "id": "string",
  • "name": "string",
  • "picture": "string",
  • "address": {
    },
  • "status": "MISSING_INFORMATIONS"
}

putOrganization

Update an organization.

path Parameters
organization-id
required
string

Technical id of the organization.

header Parameters
X-Correlation-ID
string

Correlation identifier

Request Body schema: application/json
id
string

Technical and unique identifier generated automatically, which identifies an organization.

name
required
string

Partner's name.

picture
string

Link to the partner's logo.

required
object (Address)
status
string
Enum: "MISSING_INFORMATIONS" "COMPLETED"

The partner's status.

  • By default, the organization is created with the status: "MISSING_INFORMATIONS".
  • At each login, check whether the status has changed to COMPLETED, in order to notify the legal representative that they must fill in their organization's information.

Responses

Request samples

Content type
application/json
{
  • "id": "string",
  • "name": "string",
  • "picture": "string",
  • "address": {
    },
  • "status": "MISSING_INFORMATIONS"
}

Response samples

Content type
application/json
{
  • "id": "string",
  • "name": "string",
  • "picture": "string",
  • "address": {
    },
  • "status": "MISSING_INFORMATIONS"
}

deleteOrganization

Delete an organization.

path Parameters
organization-id
required
string

Technical id of the organization.

header Parameters
X-Correlation-ID
string

Correlation identifier

Responses

Response samples

Content type
application/json
{ }

activateOrganization

Activate an organization.

path Parameters
organization-id
required
string

Technical id of the organization.

header Parameters
X-Correlation-ID
string

Correlation identifier

Responses

Response samples

Content type
application/json
{
  • "id": "string",
  • "name": "string",
  • "picture": "string",
  • "address": {
    },
  • "status": "MISSING_INFORMATIONS"
}

deactivateOrganization

Deactivate an organization.

path Parameters
organization-id
required
string

Technical id of the organization.

header Parameters
X-Correlation-ID
string

Correlation identifier

Responses

Response samples

Content type
application/json
{
  • "id": "string",
  • "name": "string",
  • "picture": "string",
  • "address": {
    },
  • "status": "MISSING_INFORMATIONS"
}

Establishments

addEstablishment

Create an establishment as a business object.

header Parameters
X-Correlation-ID
string

Correlation identifier

Request Body schema: application/json
id
string

Technical and unique identifier generated automatically, which identifies an establishment.

parentOrganism
required
string

Technical identifier of the parent organization.

status
string (establishmentStatus)
Enum: "MISSING_INFORMATIONS" "WAITING_FOR_APPROVAL" "ACTIVATED" "SUSPENDED" "DELETED"

The establishment status.

  • By default, the establishment is created with the status: "MISSING_INFORMATIONS".
  • Once all of the following information is provided, its status changes to "WAITING_FOR_APPROVAL":
    • legalStatus
    • address
    • supportingDocumentsID (provide a document justifying the company's identity)
    • companyInformation
    • have at least one natural person with (status = "ACTIVATED" and role = "ADMIN_PRO")
  • An agent reviews the supporting documents while the establishment is in "WAITING_FOR_APPROVAL". Once approved, its status changes to "ACTIVATED", allowing it to operate on the platform.
legalRepresentativeId
string

Unique identifier linked to the legal representative of the company.

financialInformationId
string

Unique identifier linked to the banking and financial details.

required
object (company)
object (tourismAgreements)
activities
Array of strings
Items Enum: "TRAVEL_SERVICE" "ACCOMMODATION_SERVICE"

List of activities the establishment can carry out:

  • for travel agencies, the type is: TRAVEL_SERVICE
  • for accommodation establishments (hotel, inn, etc.), the type is: ACCOMMODATION_SERVICE

Responses

Request samples

Content type
application/json
{
  • "id": "string",
  • "parentOrganism": "string",
  • "status": "MISSING_INFORMATIONS",
  • "legalRepresentativeId": "string",
  • "financialInformationId": "string",
  • "company": {
    },
  • "tourismAgreements": {
    },
  • "activities": [
    ]
}

Response samples

Content type
application/json
{
  • "id": "string",
  • "parentOrganism": "string",
  • "status": "MISSING_INFORMATIONS",
  • "reference": "AG-3F9A21",
  • "registrationDate": "2019-08-24T14:15:22Z",
  • "activationDate": "2019-08-24T14:15:22Z",
  • "legalRepresentativeId": "string",
  • "financialInformationId": "string",
  • "company": {
    },
  • "tourismAgreements": {
    },
  • "activities": [
    ]
}

listEstablishments

List establishments.

query Parameters
organization-id
string

Technical id of the organization.

search
string
Example: search=Marrakech

Free-text search on (reference, title or destination).

status
string (establishmentStatus)
Enum: "MISSING_INFORMATIONS" "WAITING_FOR_APPROVAL" "ACTIVATED" "SUSPENDED" "DELETED"

The establishment status.

  • By default, the establishment is created with the status: "MISSING_INFORMATIONS".
  • Once all of the following information is provided, its status changes to "WAITING_FOR_APPROVAL":
    • legalStatus
    • address
    • supportingDocumentsID (provide a document justifying the company's identity)
    • companyInformation
    • have at least one natural person with (status = "ACTIVATED" and role = "ADMIN_PRO")
  • An agent reviews the supporting documents while the establishment is in "WAITING_FOR_APPROVAL". Once approved, its status changes to "ACTIVATED", allowing it to operate on the platform.
currentPage
integer >= 0

Current page number. Do not send this attribute on the first call.

sizePage
integer >= 3

Number of elements per page.

header Parameters
X-Correlation-ID
string

Correlation identifier

Responses

Response samples

Content type
application/json
{
  • "totalElements": 0,
  • "totalPages": 0,
  • "currentPage": 0,
  • "content": [
    ]
}

getEstablishment

Retrieve establishment information by its id.

path Parameters
establishment-id
required
string

Technical id of the establishment.

header Parameters
X-Correlation-ID
string

Correlation identifier

Responses

Response samples

Content type
application/json
{
  • "id": "string",
  • "parentOrganism": "string",
  • "status": "MISSING_INFORMATIONS",
  • "reference": "AG-3F9A21",
  • "registrationDate": "2019-08-24T14:15:22Z",
  • "activationDate": "2019-08-24T14:15:22Z",
  • "legalRepresentativeId": "string",
  • "financialInformationId": "string",
  • "company": {
    },
  • "tourismAgreements": {
    },
  • "activities": [
    ]
}

putEstablishment

Update an establishment.

path Parameters
establishment-id
required
string

Technical id of the establishment.

header Parameters
X-Correlation-ID
string

Correlation identifier

Request Body schema: application/json
id
string

Technical and unique identifier generated automatically, which identifies an establishment.

parentOrganism
required
string

Technical identifier of the parent organization.

status
string (establishmentStatus)
Enum: "MISSING_INFORMATIONS" "WAITING_FOR_APPROVAL" "ACTIVATED" "SUSPENDED" "DELETED"

The establishment status.

  • By default, the establishment is created with the status: "MISSING_INFORMATIONS".
  • Once all of the following information is provided, its status changes to "WAITING_FOR_APPROVAL":
    • legalStatus
    • address
    • supportingDocumentsID (provide a document justifying the company's identity)
    • companyInformation
    • have at least one natural person with (status = "ACTIVATED" and role = "ADMIN_PRO")
  • An agent reviews the supporting documents while the establishment is in "WAITING_FOR_APPROVAL". Once approved, its status changes to "ACTIVATED", allowing it to operate on the platform.
legalRepresentativeId
string

Unique identifier linked to the legal representative of the company.

financialInformationId
string

Unique identifier linked to the banking and financial details.

required
object (company)
object (tourismAgreements)
activities
Array of strings
Items Enum: "TRAVEL_SERVICE" "ACCOMMODATION_SERVICE"

List of activities the establishment can carry out:

  • for travel agencies, the type is: TRAVEL_SERVICE
  • for accommodation establishments (hotel, inn, etc.), the type is: ACCOMMODATION_SERVICE

Responses

Request samples

Content type
application/json
{
  • "id": "string",
  • "parentOrganism": "string",
  • "status": "MISSING_INFORMATIONS",
  • "legalRepresentativeId": "string",
  • "financialInformationId": "string",
  • "company": {
    },
  • "tourismAgreements": {
    },
  • "activities": [
    ]
}

Response samples

Content type
application/json
{
  • "id": "string",
  • "parentOrganism": "string",
  • "status": "MISSING_INFORMATIONS",
  • "reference": "AG-3F9A21",
  • "registrationDate": "2019-08-24T14:15:22Z",
  • "activationDate": "2019-08-24T14:15:22Z",
  • "legalRepresentativeId": "string",
  • "financialInformationId": "string",
  • "company": {
    },
  • "tourismAgreements": {
    },
  • "activities": [
    ]
}

deleteEstablishment

Delete an establishment.

path Parameters
establishment-id
required
string

Technical id of the establishment.

header Parameters
X-Correlation-ID
string

Correlation identifier

Responses

Response samples

Content type
application/json
{ }

Approve and activate an establishment

Allows an agent to approve an establishment whose supporting documents have been reviewed. The establishment must be in "WAITING_FOR_APPROVAL" status; when approved, its status is updated to "ACTIVATED".

path Parameters
establishment-id
required
string

Technical id of the establishment to approve.

header Parameters
X-Correlation-ID
string

Correlation identifier

Responses

Response samples

Content type
application/json
{
  • "id": "string",
  • "parentOrganism": "string",
  • "status": "MISSING_INFORMATIONS",
  • "reference": "AG-3F9A21",
  • "registrationDate": "2019-08-24T14:15:22Z",
  • "activationDate": "2019-08-24T14:15:22Z",
  • "legalRepresentativeId": "string",
  • "financialInformationId": "string",
  • "company": {
    },
  • "tourismAgreements": {
    },
  • "activities": [
    ]
}

Legal_Representative

Add a legal representative

Creates and links a new legal representative to the specified partner establishment.

path Parameters
establishment-id
required
string

Technical id of the establishment.

header Parameters
X-Correlation-ID
string

Unique correlation identifier for tracing requests across microservices.

Request Body schema: application/json
required

The legal representative object payload containing identity, contact, and ownership details.

id
string

Technical and unique identifier generated automatically, which identifies an governance object.

lastName
required
string

Last name of the legal representative.

firstName
required
string

First name of the legal representative.

identityDocumentType
required
string

Type of identity document provided (e.g., CIN, Passport).

identityNumber
required
string

Identification number of the official identity document.

identityExpiryDate
required
string <date>

Expiry date of the identity document.

supportingDocumentsId
string <uri>

URL link to the supporting identity or registration document.

email
required
string <email>

Professional email address of the legal representative.

required
object (Phone)

Phone number.

ownershipPercentage
required
number <float>

Percentage of capital ownership held by the representative.

nationality
required
string

Nationality of the legal representative.

Responses

Request samples

Content type
application/json
{}

Response samples

Content type
application/json
{}

Get a legal representative by ID

Retrieves the detailed information of a specific legal representative tied to an establishment.

path Parameters
establishment-id
required
string

Technical id of the establishment.

legal-representative-id
required
string

Technical unique identifier of the legal representative.

header Parameters
X-Correlation-ID
string

Unique correlation identifier for tracing requests across microservices.

Responses

Response samples

Content type
application/json
{}

Update a legal representative

Updates an existing legal representative's details for the given technical identifier.

path Parameters
establishment-id
required
string

Technical id of the establishment.

legal-representative-id
required
string

Technical unique identifier of the legal representative.

header Parameters
X-Correlation-ID
string

Unique correlation identifier for tracing requests across microservices.

Request Body schema: application/json
required

Updated payload data for the legal representative.

id
string

Technical and unique identifier generated automatically, which identifies an governance object.

lastName
required
string

Last name of the legal representative.

firstName
required
string

First name of the legal representative.

identityDocumentType
required
string

Type of identity document provided (e.g., CIN, Passport).

identityNumber
required
string

Identification number of the official identity document.

identityExpiryDate
required
string <date>

Expiry date of the identity document.

supportingDocumentsId
string <uri>

URL link to the supporting identity or registration document.

email
required
string <email>

Professional email address of the legal representative.

required
object (Phone)

Phone number.

ownershipPercentage
required
number <float>

Percentage of capital ownership held by the representative.

nationality
required
string

Nationality of the legal representative.

Responses

Request samples

Content type
application/json
{}

Response samples

Content type
application/json
{}

Financial_Information

Add financial information

Registers and attaches financial and banking details (such as RIB) to the establishment.

path Parameters
establishment-id
required
string

Technical id of the establishment.

header Parameters
X-Correlation-ID
string

Unique correlation identifier for tracing requests across microservices.

Request Body schema: application/json
required

Financial information payload including bank name, account holder, and RIB.

id
string

Unique identifier for the financial information record.

bankName
required
string

Name of the partner's financial institution or bank.

accountHolder
required
string

Official name of the bank account holder or corporate entity.

rib
required
string

Bank Identity Statement number (RIB - 24 digits).

Responses

Request samples

Content type
application/json
{
  • "id": "jhgfjhgjhgjh",
  • "bankName": "BCP (Banque Centrale Populaire)",
  • "accountHolder": "Atlas Routes Morocco SARL",
  • "rib": "101450211112345678901244"
}

Response samples

Content type
application/json
{
  • "id": "jhgfjhgjhgjh",
  • "bankName": "BCP (Banque Centrale Populaire)",
  • "accountHolder": "Atlas Routes Morocco SARL",
  • "rib": "101450211112345678901244"
}

Get financial information by ID

Retrieves the financial and banking data record associated with an establishment.

path Parameters
establishment-id
required
string

Technical id of the establishment.

financial-information-id
required
string

Technical unique identifier of the financial information record.

header Parameters
X-Correlation-ID
string

Unique correlation identifier for tracing requests across microservices.

Responses

Response samples

Content type
application/json
{
  • "id": "jhgfjhgjhgjh",
  • "bankName": "BCP (Banque Centrale Populaire)",
  • "accountHolder": "Atlas Routes Morocco SARL",
  • "rib": "101450211112345678901244"
}

Update financial information

Replaces or updates the financial/banking information record for the establishment.

path Parameters
establishment-id
required
string

Technical id of the establishment.

financial-information-id
required
string

Technical unique identifier of the financial information record.

header Parameters
X-Correlation-ID
string

Unique correlation identifier for tracing requests across microservices.

Request Body schema: application/json
required

Updated financial and banking details payload.

id
string

Unique identifier for the financial information record.

bankName
required
string

Name of the partner's financial institution or bank.

accountHolder
required
string

Official name of the bank account holder or corporate entity.

rib
required
string

Bank Identity Statement number (RIB - 24 digits).

Responses

Request samples

Content type
application/json
{
  • "id": "jhgfjhgjhgjh",
  • "bankName": "BCP (Banque Centrale Populaire)",
  • "accountHolder": "Atlas Routes Morocco SARL",
  • "rib": "101450211112345678901244"
}

Response samples

Content type
application/json
{
  • "id": "jhgfjhgjhgjh",
  • "bankName": "BCP (Banque Centrale Populaire)",
  • "accountHolder": "Atlas Routes Morocco SARL",
  • "rib": "101450211112345678901244"
}