Corporate Codes ​

A company with a negotiated rate holds a corporate agreement code with an operator. Attach the code to the passengers and the operator prices the journey on the agreement. Like a travel card, a code is part of the price: it is sent when you ask for offers and when you create the booking, and it can't be changed afterward.

Pricing with a Corporate Code ​

Attach codes to passengers in the corporateCodes field of PassengerPlaceholderInput. Each entry names the agreement code as the operator issued it and the operator holding it, as its Operator.code, for example aaop_sj. Codes ride along wherever you pass passengers: journeyOffer and combinedJourneyOffer for pricing, and createBooking.

Every segment of a journeys result names its operator, so read the code from operator { code } there. A journey can mix operators, as in the example below, so a code may apply to some of its parts and not others; see Reading What Was Applied.

Example: Find the operators on a journey
graphql
query Journeys {
  journeys(
    origin: { uid: "XPORaKED" }
    destination: { uid: "mqpeTG30" }
    date: "2026-11-06"
  ) {
    id
    itinerary {
      ... on SegmentCollection {
        segments {
          origin {
            name
          }
          destination {
            name
          }
          operator {
            code
            name
          }
        }
      }
    }
  }
}
query Journeys {
  journeys(
    origin: { uid: "XPORaKED" }
    destination: { uid: "mqpeTG30" }
    date: "2026-11-06"
  ) {
    id
    itinerary {
      ... on SegmentCollection {
        segments {
          origin {
            name
          }
          destination {
            name
          }
          operator {
            code
            name
          }
        }
      }
    }
  }
}
json
{
  "data": {
    "journeys": [
      {
        "id": "3533e7b3-c904-4ad5-9283-2729611c177a",
        "itinerary": [
          {
            "segments": [
              {
                "origin": { "name": "Stockholm Central" },
                "destination": { "name": "Linköping" },
                "operator": { "code": "aaop_sj", "name": "SJ" }
              },
              {
                "origin": { "name": "Linköping Fjärrbussterminal" },
                "destination": { "name": "Göteborg Nils Ericsonterminal" },
                "operator": { "code": "aaop_vy", "name": "Vy" }
              }
            ]
          }
        ]
      }
    ]
  }
}
{
  "data": {
    "journeys": [
      {
        "id": "9ce0fcb1-93f9-4614-a5cc-021e6d9ce5c9",
        "itinerary": [
          {
            "segments": [
              {
                "origin": { "name": "Stockholm Central" },
                "destination": { "name": "Linköping" },
                "operator": { "code": "aaop_sj", "name": "SJ" }
              },
              {
                "origin": { "name": "Linköping Fjärrbussterminal" },
                "destination": { "name": "Göteborg Nils Ericsonterminal" },
                "operator": { "code": "aaop_vy", "name": "Vy" }
              }
            ]
          }
        ]
      }
    ]
  }
}

Every passenger in a search or booking carries the same codes. A code naming an operator we don't know is refused with CORPORATE_CODE_OPERATOR_UNKNOWN, and passengers on different agreements are refused with CORPORATE_CODES_MIXED; search and book them separately.

Send the same codes when you create the booking as you sent when you priced it. The passengers are compared on their codes as well as their type, age and travel cards, and a booking whose codes differ from the offer's is refused with PASSENGER_MISMATCH.

Example: Get offers with a corporate code
graphql
subscription GetJourneyOffer {
  journeyOffer(
    journeyId: "dad027ed-e91b-41f1-8b81-84168fd93070"
    passengers: [
      {
        type: ADULT
        corporateCodes: [{ code: "977516", operator: "aaop_sj" }]
      }
    ]
  ) {
    status
    itinerary {
      ... on SegmentCollection {
        offers {
          id
          price {
            amount
            currency
          }
          parts {
            ... on AdmissionPart {
              flexibility
              comfortClass
              appliedCorporateCodes {
                code
                operator {
                  code
                }
              }
            }
            ... on ReservationPart {
              flexibility
              comfortClass
              appliedCorporateCodes {
                code
                operator {
                  code
                }
              }
            }
          }
        }
      }
    }
  }
}
subscription GetJourneyOffer {
  journeyOffer(
    journeyId: "08e18515-3947-4f49-92b2-55d8c6012acf"
    passengers: [
      {
        type: ADULT
        corporateCodes: [{ code: "977516", operator: "aaop_sj" }]
      }
    ]
  ) {
    status
    itinerary {
      ... on SegmentCollection {
        offers {
          id
          price {
            amount
            currency
          }
          parts {
            ... on AdmissionPart {
              flexibility
              comfortClass
              appliedCorporateCodes {
                code
                operator {
                  code
                }
              }
            }
            ... on ReservationPart {
              flexibility
              comfortClass
              appliedCorporateCodes {
                code
                operator {
                  code
                }
              }
            }
          }
        }
      }
    }
  }
}
json
{
  "data": {
    "journeyOffer": {
      "status": "SUCCESS",
      "itinerary": [
        {
          "offers": [
            {
              "id": "offer_b4s7m327t2t3n5y0g1a2q1e3z0",
              "price": { "amount": 18900, "currency": "SEK" },
              "parts": [
                {
                  "flexibility": "NON_FLEX",
                  "comfortClass": "2nd",
                  "appliedCorporateCodes": [
                    { "code": "977516", "operator": { "code": "aaop_sj" } }
                  ]
                }
              ]
            }
          ]
        }
      ]
    }
  }
}
{
  "data": {
    "journeyOffer": {
      "status": "SUCCESS",
      "itinerary": [
        {
          "offers": [
            {
              "id": "offer_b1k4m460v440s2y2x690w1b5w3",
              "price": { "amount": 18900, "currency": "SEK" },
              "parts": [
                {
                  "flexibility": "NON_FLEX",
                  "comfortClass": "2nd",
                  "appliedCorporateCodes": [
                    { "code": "977516", "operator": { "code": "aaop_sj" } }
                  ]
                }
              ]
            }
          ]
        }
      ]
    }
  }
}

Reading What Was Applied ​

Every AdmissionPart and ReservationPart carries appliedCorporateCodes: the codes the operator honoured on that part, as it reported them. It is empty when none applied, so a code you sent that is missing there did not discount that part. On a journey sold as one offer per operator, a code can apply to one operator's parts and not another's.

The field is on the offers you price, on the booking's offers, and on the order's JourneyOrderItem.offer.parts. The codes a passenger was searched and booked with come back as corporateCodes on every passenger of a booking or order.

Corporate Codes Are Fixed at Creation ​

A booking is priced on its passengers' codes, so they can't change once the booking exists. Leave corporateCodes out when updating passengers. To book on a different agreement, price the journey again with the right codes and create a new booking from that offer.

Re-sending the codes a passenger already holds is accepted and changes nothing; the order doesn't matter. Anything else is rejected with CORPORATE_CODES_IMMUTABLE, and none of the passenger changes in the call are saved. null is read as an empty list, not as leaving the field out, so it counts as a change for a passenger who holds codes.

json
{
  "errors": [
    {
      "message": "Corporate codes can't be changed on an existing booking. Search again with the right codes and create a new booking.",
      "extensions": {
        "code": "CORPORATE_CODES_IMMUTABLE"
      }
    }
  ]
}
{
  "errors": [
    {
      "message": "Corporate codes can't be changed on an existing booking. Search again with the right codes and create a new booking.",
      "extensions": {
        "code": "CORPORATE_CODES_IMMUTABLE"
      }
    }
  ]
}

Next Steps ​