{"openapi":"3.1.0","info":{"title":"OpenAPI definition","version":"v0"},"servers":[{"url":"https://sandbox.bipintelligence.com/open-api","description":"Generated server url"}],"security":[{"Bearer Authentication":[]}],"paths":{"/spend/transactions":{"post":{"tags":["spend-controller"],"summary":"Search spend transactions","description":"Search spend transactions","operationId":"getSpendTransactions","parameters":[{"name":"sortBy","in":"query","description":"sort by Method","required":false,"schema":{"type":"string","description":"sort by Method","enum":["BUYER_NAME","SUPPLIER_NAME","TRANSACTION_NAME","AMOUNT","TRANSACTION_DATE","INDUSTRY","REGION"]}},{"name":"sortDirection","in":"query","description":"sort direction","required":false,"schema":{"type":"string","description":"sort direction","enum":["ASC","DESC"]}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiSpendTransactionRequest"}}},"required":true},"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"type":"object"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"type":"object"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"type":"object"}}}},"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiSpendTransactionResponse"}}}}}}},"/notices":{"post":{"tags":["open-api-controller"],"summary":"search contract notices","description":"search contract notices based on search criteria","operationId":"searchContractNotices","parameters":[{"name":"sortBy","in":"query","description":"sort method","required":false,"schema":{"type":"string","description":"sort method","enum":["NOTICE_ID","TITLE","BUYER_NAME","VALUE","CURRENCY","COUNTRY_CODE","PUBLISHED_DATE","CONTRACT_START_DATE","CONTRACT_END_DATE"]}},{"name":"sortDirection","in":"query","description":"sort direction","required":false,"schema":{"type":"string","description":"sort direction","enum":["ASC","DESC"]}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiContractNoticesRequest"}}},"required":true},"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"type":"object"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"type":"object"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"type":"object"}}}},"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiContractNoticesResponse"}}}}}}},"/awards":{"post":{"tags":["open-api-controller"],"summary":"search contract awards","description":"search contract awards based on search criteria","operationId":"searchContractAwards","parameters":[{"name":"sortBy","in":"query","description":"sort method","required":false,"schema":{"type":"string","description":"sort method","enum":["AWARD_ID","TITLE","BUYER_NAME","SUPPLIER_NAME","VALUE","CURRENCY","COUNTRY_CODE","PUBLISHED_DATE","CONTRACT_START_DATE","CONTRACT_END_DATE"]}},{"name":"sortDirection","in":"query","description":"sort direction","required":false,"schema":{"type":"string","description":"sort direction","enum":["ASC","DESC"]}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiAwardsRequest"}}},"required":true},"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"type":"object"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"type":"object"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"type":"object"}}}},"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiAwardsResponse"}}}}}}},"/spend/suppliers":{"get":{"tags":["spend-controller"],"summary":"Get spend supplier names","description":"Get spend supplier names","operationId":"getSpendSuppliers","parameters":[{"name":"pageNo","in":"query","description":"pageNo","required":false,"schema":{"type":"integer","format":"int32","description":"pageNo"}},{"name":"sortDirection","in":"query","description":"sort direction","required":false,"schema":{"type":"string","description":"sort direction","enum":["ASC","DESC"]}}],"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"type":"object"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"type":"object"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"type":"object"}}}},"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiSpendOrganisationResponse"}}}}}}},"/spend/buyers":{"get":{"tags":["spend-controller"],"summary":"Get spend buyer names","description":"Get spend buyer names","operationId":"getSpendBuyers","parameters":[{"name":"pageNo","in":"query","description":"pageNo","required":false,"schema":{"type":"integer","format":"int32","description":"pageNo"}},{"name":"sortDirection","in":"query","description":"sort direction","required":false,"schema":{"type":"string","description":"sort direction","enum":["ASC","DESC"]}}],"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"type":"object"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"type":"object"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"type":"object"}}}},"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiSpendOrganisationResponse"}}}}}}},"/notices/{id}":{"get":{"tags":["open-api-controller"],"summary":"get contract notice details","description":"get contract notice details based on notice id","operationId":"getContractNoticeDetails","parameters":[{"name":"id","in":"path","description":"notice id to fetch notice details","required":true,"schema":{"type":"integer","format":"int64"}}],"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"type":"object"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"type":"object"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"type":"object"}}}},"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiContractNoticeDetailResponse"}}}}}}},"/awards/{id}":{"get":{"tags":["open-api-controller"],"summary":"get contract award details","description":"get contract award details based on award id","operationId":"getAwardDetails","parameters":[{"name":"id","in":"path","description":"award id to fetch award details","required":true,"schema":{"type":"integer","format":"int64"}}],"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"type":"object"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"type":"object"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"type":"object"}}}},"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiAwardDetailResponse"}}}}}}}},"components":{"schemas":{"ApiSpendTransactionRequest":{"type":"object","description":"Request object for searching spend transactions.","properties":{"organisationType":{"type":"string","description":"OrganisationType: BUYERS/SUPPLIERS","enum":["SUPPLIERS","BUYERS"]},"organisationName":{"type":"string","description":"Organisation Name","minLength":1},"transactionStartDate":{"type":"string","format":"date","description":"Start Date (Inclusive)"},"transactionEndDate":{"type":"string","format":"date","description":"End Date (Inclusive) - Start and End Date should be within the same month, eg 2023-01-01 - 2023-01-28, 2024-07-17 - 2024-07-26"}},"required":["organisationType","transactionEndDate","transactionStartDate"]},"ApiSpendTransaction":{"type":"object","properties":{"buyerName":{"type":"string"},"supplierName":{"type":"string"},"transactionName":{"type":"string"},"amount":{"type":"number"},"transactionDate":{"type":"string","format":"date"},"industry":{"type":"string"},"region":{"type":"string"}}},"ApiSpendTransactionResponse":{"type":"object","properties":{"totalResults":{"type":"integer","format":"int64"},"results":{"type":"array","items":{"$ref":"#/components/schemas/ApiSpendTransaction"}}}},"ApiContractNoticesRequest":{"type":"object","properties":{"title":{"type":"string","description":"Contract Title"},"keywordCriteria":{"$ref":"#/components/schemas/ApiKeywordCriteria","description":"Keyword Criteria"},"cpvCodeCriteria":{"$ref":"#/components/schemas/ApiCpvCodeCriteria","description":"Cpv Code Criteria"},"buyerNames":{"type":"array","description":"Buyer Name","items":{"type":"string"}},"countryCodes":{"type":"array","description":"Country Codes","items":{"type":"string"}},"valueRange":{"$ref":"#/components/schemas/ApiValueRange","description":"Value Range"},"dateCriteria":{"$ref":"#/components/schemas/ApiNoticeDateCriteria","description":"Date Criteria"}}},"ApiCpvCodeCriteria":{"type":"object","properties":{"shouldContain":{"type":"array","description":"CPV Codes that should appear in the contract (Codes should be 8 numeric values e.g. '20000000')","items":{"type":"string"}},"shouldContainMatchType":{"type":"string","description":"For terms in the 'shouldContain' list, can any CPV match, or must all CPVs match for the contract to be included","enum":["ANY","ALL"]}}},"ApiDateRange":{"type":"object","properties":{"rangeFrom":{"type":"string","format":"date","description":"Range From (Inclusive)"},"rangeTo":{"type":"string","format":"date","description":"Range To (Inclusive)"}}},"ApiKeywordCriteria":{"type":"object","properties":{"shouldContain":{"type":"array","description":"Terms that should appear in the contract","items":{"type":"string"}},"shouldContainMatchType":{"type":"string","description":"For terms in the 'shouldContain' list, can any term match, or must all terms match for the contract to be included","enum":["ANY","ALL"]},"shouldNotContain":{"type":"array","description":"Terms that should not appear in the contract","items":{"type":"string"}},"shouldNotContainMatchType":{"type":"string","description":"For terms in the 'shouldNotContain' list, can any term match, or must all terms match for the contract to be excluded","enum":["ANY","ALL"]}}},"ApiNoticeDateCriteria":{"type":"object","properties":{"publishedDateRange":{"$ref":"#/components/schemas/ApiDateRange","description":"Published Date Range Criteria"},"deadlineDateRange":{"$ref":"#/components/schemas/ApiDateRange","description":"Deadline Date Range Criteria"}}},"ApiValueRange":{"type":"object","properties":{"valueFrom":{"type":"number"},"valueEnd":{"type":"number"}}},"ApiContractNoticesResponse":{"type":"object","properties":{"totalResults":{"type":"integer","format":"int64"},"results":{"type":"array","items":{"$ref":"#/components/schemas/ApiNoticeSummary"}}}},"ApiNoticeSummary":{"type":"object","properties":{"id":{"type":"integer","format":"int64"},"title":{"type":"string"},"awardingAuthority":{"type":"string"},"value":{"type":"number"},"currency":{"type":"string"},"country":{"type":"string"},"publishedDate":{"type":"string","format":"date"},"startDate":{"type":"string","format":"date"},"endDate":{"type":"string","format":"date"},"deadlineDate":{"type":"string","format":"date"},"cpvCodes":{"type":"array","items":{"type":"string"}},"regionCodes":{"type":"array","items":{"type":"string"}},"sectors":{"type":"array","items":{"type":"string"}}}},"ApiAwardDateCriteria":{"type":"object","properties":{"publishedDateRange":{"$ref":"#/components/schemas/ApiDateRange","description":"publishedDate api date range"},"endDateRange":{"$ref":"#/components/schemas/ApiDateRange","description":"deadline api date range"}}},"ApiAwardsRequest":{"type":"object","properties":{"title":{"type":"string","description":"Award Title"},"keywordCriteria":{"$ref":"#/components/schemas/ApiKeywordCriteria","description":"Keyword Criteria"},"cpvCodeCriteria":{"$ref":"#/components/schemas/ApiCpvCodeCriteria","description":"Cpv Code Criteria"},"countryCodes":{"type":"array","description":"Country Codes","items":{"type":"string"}},"buyerNames":{"type":"array","description":"Buyer Name","items":{"type":"string"}},"supplierNames":{"type":"array","description":"Supplier Name","items":{"type":"string"}},"valueRange":{"$ref":"#/components/schemas/ApiValueRange","description":"Value Range"},"dateCriteria":{"$ref":"#/components/schemas/ApiAwardDateCriteria","description":"Date Criteria"}}},"ApiAwardSummary":{"type":"object","properties":{"id":{"type":"integer","format":"int64"},"title":{"type":"string"},"awardingAuthority":{"type":"string"},"suppliers":{"type":"array","items":{"type":"string"}},"value":{"type":"number"},"currency":{"type":"string"},"country":{"type":"string"},"publishedDate":{"type":"string","format":"date"},"startDate":{"type":"string","format":"date"},"endDate":{"type":"string","format":"date"},"cpvCodes":{"type":"array","items":{"type":"string"}},"regionCodes":{"type":"array","items":{"type":"string"}},"sectors":{"type":"array","items":{"type":"string"}}}},"ApiAwardsResponse":{"type":"object","properties":{"totalResults":{"type":"integer","format":"int64"},"results":{"type":"array","items":{"$ref":"#/components/schemas/ApiAwardSummary"}}}},"ApiSpendOrganisation":{"type":"object","properties":{"organisationName":{"type":"string"}}},"ApiSpendOrganisationResponse":{"type":"object","properties":{"totalResults":{"type":"integer","format":"int64"},"totalPages":{"type":"integer","format":"int64"},"results":{"type":"array","items":{"$ref":"#/components/schemas/ApiSpendOrganisation"}}}},"ApiContractNoticeDetail":{"type":"object","properties":{"id":{"type":"integer","format":"int64"},"title":{"type":"string"},"description":{"type":"string"},"location":{"type":"string"},"value":{"type":"number"},"publishedDate":{"type":"string","format":"date-time"},"cpvCodes":{"type":"string"},"contact":{"$ref":"#/components/schemas/Contact"},"awardingAuthority":{"type":"string"},"address":{"$ref":"#/components/schemas/AwardingAuthorityAddress"},"referenceNumber":{"type":"string"},"deadlineDate":{"type":"string"}}},"ApiContractNoticeDetailResponse":{"type":"object","properties":{"apiContractNoticeDetail":{"$ref":"#/components/schemas/ApiContractNoticeDetail"}}},"AwardingAuthorityAddress":{"type":"object","properties":{"address":{"type":"string"},"town":{"type":"string"},"postCode":{"type":"string"}}},"Contact":{"type":"object","properties":{"contactName":{"type":"string"},"contactPhoneNumber":{"type":"string"},"email":{"type":"string"}}},"ApiAwardDetailResponse":{"type":"object","properties":{"apiAwardDetails":{"$ref":"#/components/schemas/ApiAwardDetails"}}},"ApiAwardDetails":{"type":"object","properties":{"id":{"type":"integer","format":"int64"},"title":{"type":"string"},"description":{"type":"string"},"location":{"type":"string"},"value":{"type":"number"},"publishedDate":{"type":"string","format":"date-time"},"cpvCodes":{"type":"string"},"contact":{"$ref":"#/components/schemas/Contact"},"awardingAuthority":{"type":"string"},"address":{"$ref":"#/components/schemas/AwardingAuthorityAddress"},"referenceNumber":{"type":"string"},"endDate":{"type":"string"},"suppliers":{"type":"array","items":{"type":"string"}}}}},"securitySchemes":{"Bearer Authentication":{"type":"http","scheme":"bearer","bearerFormat":"JWT"}}}}