Versions Compared

Key

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

Goal:   Creating a new PO after an original PO is Rejected by the Seller.

Setup: You are a buyer and have sold some inventory to your client. Your purchase was rejected by the seller for some reason, and you would like to choose a substitution via the API, rather than through the CORE interface.

Task: Search for inventory via Ticket Groups / Index and then create a substitution order using Orders / Create with specific parameters described below.


  1. Find the ticket group you would like to substitute the rejected ticket group with. - Hit the GET /v9/ticket_groupslistings endpoint with the following query parameters:

    Code Blocklanguage

    bashthemeRDarkfirstline1title

    Find the sub ticket group

    Code Block
    linenumberslanguagetruebash
    curl -i \
    -X GET \
    -H "X-Signature: <REQUEST SIGNATURE>" \
    -H "X-Token: <API TOKEN>" \
    --url 'https://api.ticketevolution.com/v9/ticket_groupslistings?event_id=9876543&type=event&exclude_office_id=1234&quantity=2'
    
    


    Not all of these are necessary, but passing them in will make it easier to find adequate replacement ticket groups.

    1. event_id: Necessary to find ticket groups belonging to the event

    exclude_office_id: Optionally pass your office id to exclude your inventory for the same event
    1. quantity: Optionally set for the quantity of tickets you are looking to substitute, ensuring the ticket split rules are possible and there are enough available

  2. Assemble

    params

    parameters based on the ticket group you have selected 

    These values will all be found in the json response object for the chosen ticket group.

    • ticket_group_id

    • wholesale_price

    These values should be known to you based on the rejected purchase order.

    • quantity

    • purchase_order_id

    Examples of these values are:

    • ticket_group_id: 9876543

    • wholesale_price: 190.1

    • quantity: 2

    • purchase_order_id: 228812


  3. Assemble new POST params

    based on the assembled params 

    Code Block
    languagebash
    themeRDark
    titleAssemble new POST params
    linenumberstruejson
    {
      "orders": [
        {
          "shipped_items": [
            {
              "items": [
    {
    "price": <wholesale_price>,
    "quantity": <quantity>,
    "ticket_group_id": <ticket_group_id>
    }
    ]
    }
    ],
    "substitute_order_link_id": <original_purchase_order_id>
    }
    ]
    }
    
    

    Using the example values from above, and condensed, this JSON structure would be:

    {"orders":[{"shipped_items":[{"items":[{"price":190.1,"quantity":2,
                {
                  "price": 190.1,
                  "quantity": 2,
                  "ticket_group_id": 9876543
                }
              ]
            }
          ],
          "substitute_order_link_id": 228812
        }
      ]
    }

  4. Make a

    signed

    POST

    call

    to

    the

    /v9/orders endpoint including the structure in the body

    - Example CURL statement for this substitute order post

    Code Block
    languagebash
    themeRDark
    firstline1
    titleMake a signed POST call to the v9/orders
    linenumberstrue
    curl -i \
         -X POST \
         -H "X-Signature: <SIGNATURE>" \
         -H "X-Token: <API TOKEN>" \
         -H "Content-Type: application/json" \
         -d '{"orders":[{"shipped_items":[{"items":[{"price":190.1,"quantity":2,"ticket_group_id":9876543}]}],"substitute_order_link_id":228812}]}' \
         --url 'https://api.sandbox.ticketevolution.com/v9/orders?'

    You can expect the same response structure as the /v9/orders API you are already using.

...

Filter by label (Content by label)
showLabelsfalse
max5
spacesAPI
sortmodified
showSpacefalse

...

reversetrue
typepage
cqllabel = "api" and type = "page" and space = "API"
labelsAPI