Import external codes

POST{{API_BASE_URL}}/tasks/tickets/import

Import Tickets for a Task

The API endpoint POST {{API_BASE_URL}}/tasks/tickets/import is used to import tickets for a specific event. The request should include the faireventId, articleId, and an array of Tickets, where each ticket contains information about the person associated with the ticket.

Auth and Role

  • Auth
    OAuth 2.0 (inherit from collection)

  • Required role

    • BASEROLE

    • ApiTicketImport

Headers

  • Content-Type: application/json

  • Accept: */*

Request Body

The request body must be in JSON format and contains the following parameter:

  • faireventId:
    Here you can use one of the following properties of the fair event:

    • internal Id: 42 or "42"

    • unique id: "C8847785-CF69-EE11-93CF-00155D960409"

    • slug: "hmmcc23"

    • year and faireventnumber: "2023-6189" (format: YYYY-nnn)

  • fairevenExternalId - The external id 1 or 2 or 3 of the fairevent.
    You can also use the fairevent external id. For this you must set faireventId to null

  • articleId (optional):
    Here you can use one of the following properties of the article:

    • internal Id: 186 or "186"

    • unique id: "37A8A129-D669-EE11-93CF-00155D960409"

  • articleNumber (optional)
    You can also use the article number. For this you must set articleId to null

  • articleExternalId (optional)
    The external id 1 or 2 or 3 of the article. You can also use the article external id. For this you must set articleId and article number to null

  • Tickets (required array): An array containing ticket objects, each with information about the ticket and the associated person.

Ticket Object

  • Ticket (object): Information about the ticket.

    • Barcode (optional): The barcode associated with the ticket.

    • ExternalId (optional): The external ID of the ticket.

    • Blocked (required): A boolean indicating whether the ticket is blocked.

  • Person (object): Information about the person associated with the ticket.

    • ExternalId (optional): The external ID of the person.

    • FirstName (optional): The first name of the person.

    • LastName (optional): The last name of the person.

    • GenderCode (optional): The gender code of the person.

    • SalutationLookup (optional): The salutation of the person.

    • NationalityLookup (optional): The nationality of the person.

    • JobTitle (optional): The job title of the person.

    • DataObjectType (optional): The data object type of the person.

    • Company (optional): The company associated with the person.

    • Info (array): Additional information about the person.

      • Key (string): The key of the information.

      • Value (optional): The value of the information.

    • EMail (required): The email address of the person.

    • Phone (required): The phone number of the person.

    • Contacts (array): An array of contact information for the person.

      • ExternalId (optional): The external ID of the contact.

      • ExternalId2 (optional): Another external ID of the contact.

      • ExternalId3 (optional): Yet another external ID of the contact.

      • Value (optional): The value of the contact.

      • ContactNameLookup (optional): The name associated with the contact.

      • ContactTypeLookup (optional): The type of the contact.

      • IsMainContact (optional): Indicates if the contact is the main contact.

      • Info (array): Additional information about the contact.

    • Addresses (array): An array of addresses for the person.

      • ExternalId (optional): The external ID of the address.

      • ExternalId2 (optional): Another external ID of the address.

      • ExternalId3 (optional): Yet another external ID of the address.

      • Street (optional): The street of the address.

      • Street2 (optional): Another street information of the address.

      • Street3 (optional): Yet another street information of the address.

      • StreetNumber (optional): The street number of the address.

      • Line1 (optional): Line 1 of the address.

      • Line2 (optional): Line 2 of the address.

      • Line3 (optional): Line 3 of the address.

      • City (optional): The city of the address.

      • StateOrProvince (optional): The state or province of the address.

      • County (optional): The county of the address.

      • CountryLookup (optional): The country of the address.

      • PostalCode (optional): The postal code of the address.

      • PostOfficeBox (optional): The post office box of the address.

      • AddressTypeLookup (optional): The type of the address.

      • IsMainAddress (optional): Indicates if the address is the main address.

      • Info (array): Additional information about the address.

Response

The response structure will provide feedback on the success or failure of the import operation. While the exact response structure is not detailed here, users can expect a confirmation of the import status, along with any relevant messages or error details if applicable.

201 CREATED

  • Default success code for creation - resource has been created successfully.

  • The location header points to the URL of the created task (api/tasks/tickets/import/{id}).

  • Alternatively, you can read result.import.id from the response body to build the status URL.

400 BAD REQUEST

Default Error Code - Used if an object has invalid parameters, for more information about this read "Errors".

500 INTERNAL SERVER ERROR

Default Error Code - Used if an exception occurs

Next Steps

1. Poll GET "/tasks/tickets/import/{id}" until status is "Completed"

2. Retrieve result with GET "/tasks/tickets/import/{id}/result"

Usage

  • To use this endpoint effectively, ensure that the faireventId or the fairevenExternalId is correctly populated with the relevant event data. This will ensure that the import operation targets the correct exhibitors associated with the specified fair event.

  • Use "EnableDetailedResult=true" to get extended logs in the result.

Response Structure

If the process is successful, the server returns a 201 Created status with details of the imported task.

{
"_links": {
"self": {
"href": "/tickets/import"
},
"curies": {
"name": "adi",
"href": "http://dev.aditus.de:8000/ADITUS-DEV-0_API/api/tasks/{rel}",
"templated": true
}
},
"result": {
"import": {
"createdBy": 14961,
"createdOn": "2025-09-18T10:31:12.4752569",
"executionFrom": "2025-09-18T10:31:12.4752569",
"lastActionOn": "2025-09-18T10:31:12.7208533",
"id": "742",
"status": 253,
"targetResourceId": 1,
"finishedOn": "2025-09-18T10:31:12.7208533",
"startedOn": null,
"taskId": 12550
}
}
}

Keywords: ticket import, json import, data array, start task, create import

Authentication#auth

Requires a bearer token with the matching scope. Mint via OAuth 2.0 client credentials and send it in the Authorization header.

Responses#responses

201CreatedImport external codes