meta {
  name: CreateOffer
  type: http
  seq: 1
}

post {
  url: {{exchange_graphql_team}}
  body: graphql
  auth: none
}

headers {
  Authorization: Bearer {{access_token}}
}

body:graphql {
  mutation CreateOffer($input: OfferInput!) {
    createOffer(input: $input) {
      success
      message
      workflowId
      offerUuid
    }
  }
}

body:graphql:vars {
  {
    "input": {
      "teamUuid": "ee0d350a-1ba8-412e-82eb-faecf542fc09",
      "productUuid": "0f60a6a7-0b03-4432-9568-b0f9f8f91397",
      "productName": "Cocoa Beans",
      "quantity": 100,
      "unit": "ton",
      "pricePerUnit": 5000,
      "currency": "USD"
    }
  }
}

script:post-response {
  console.log("Response:", JSON.stringify(res.body, null, 2));
}
