Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Anchor
GetCompanyProfile
GetCompanyProfile
Get company profile

Scopeapi.profilesondemand.read
Endpointapi/v1/profiles/company/<uuid>
Request methodGET

Retrieves the details of a single company profile.

Parameters

 

NameDescriptionValidation
<uuid>The UUID of the profile to retrieveRequired parameter
sections

Areas of the profile to be returned.

May be used to reduce the amount of data transferred, if only specific information is required

All sections will be dumped if omitted. Please identify the relevant sections for your application during development and use a restricted information subset before moving to production.

Optional

Code Block
languagebash
titleExample request
curl -v -H "Authorization: Bearer <token>" \
    https://hurricane.umbrellanet.ch/uf-test/api/v1/profiles/company/b9321d7e-9d72-4e80-ac49-d3aa38169175?sections=CONTACT_DATA,MEMBERSHIPS

...

The following sections are currently available in accordance with our Swagger schema definition:

NameContents
AGNCY_INFOAgency information:
  • uuid

  • name

CONTACT_DATA

Company contact data:

  • street

  • street2

  • zipCode

  • place

  • countryCode

  • phone

  • fax

  • E-Mail (email, email2, email3)

MEMBERSHIPS

Corporate alliance Memberships

  • airline

    • alliance (2-Letter code)

    • memberNumber

    • type

  • hotel

    • alliance (2-Letter code)

    • memberNumber

  • rentalCar

    • alliance (2-Letter code)

    • memberNumber

GENERIC_VALUESValues (where filled) from the generic setup, output as key-value pairs where the key is the fieldname and the value is the value entered on the profile.

Create new company profile

Scopeapi.profilesondemand.write
Endpointapi/v1/profiles/company
Request methodPOST

Create a new company profile

...

Update existing company profile

 

Scopeapi.profilesondemand.write
Endpointapi/v1/profiles/company/<uuid>
Request methodPATCH

Updates (part of) the details of a single company profile.

Parameters
NameDescriptionValidation
<uuid>The UUID of the profile to updateRequired parameter

 

Code Block
curl -v -X PATCH \
    -H "Authorization: Bearer <token>" \
    --data '{
  "externalNr": "0815",
  "name": "ACME Incorporated",
  "shortname": "ACME-INC”,
  "data": {
    "memberships": {
      "airline": [
				{
					"alliance": "LH",
					"memberNumber": "DEMODEMO123",
					"type": "SPECIAL_KEYWORD"
				}				
			]
    }
  }
}' https://hurricane.umbrellanet.ch/uf-test/api/v1/profiles/company/b9321d7e-9d72-4e80-ac49-d3a
Implementation notes

Depending on the authorization level of the caller, it may not be possible to edit certain properties. Changes to unmodifiable properties will be silently ignored if sent.

Callers should include only the properties they wish to edit in the PATCH request. Due to underlying synchronization logic to third party systems, it is required to perform all profile modifications within one single PATCH call (I.e. do not first edit the shortname, then add a membership code as two separate API calls).

The following logic is applied when editing collections, such as memberships to allow for modification of single elements within the collection without having separate API calls for that purpose:

  • If an “uuid” is supplied, the corresponding collection element is being modified

    • If there is no matching element with the given UUID, the update is ignored

  • In order to remove a collection item, it’s UUID is supplied, along with a property “_operation”, which is set to “remove”

In order to remove genericValues from a profile, please include the fieldname but set the field content to empty or null.

Delete company profile

Scopeapi.profilesondemand.write
Endpointapi/v1/profiles/company/<uuid>
Request methodDELETE

Delete a single company profile (along with all associated traveler profiles) from Faces as well as all downline systems.

Parameters
NameDescriptionValidation
<uuid>The UUID of the profile to deleteRequired parameter
Code Block
curl -v -X DELETE \
    -H "Authorization: Bearer <token>" \
    https://hurricane.umbrellanet.ch/uf-test/api/v1/profiles/company/b9321d7e-9d72-4e80-ac49-d3aa38169175
Example response

HTTP 204 “No Content” with empty body

Search traveler profile