{"info":{"title":"Tradeshift External API","version":"1.0.0"},"openapi":"3.0.0","paths":{"/rest/external/accesslist/operation/{operationId}/type/{typeId}/object/{objectId}":{"parameters":[{"name":"operationId","in":"path","required":true,"schema":{"type":"integer"},"description":"Operation id to be checked"},{"name":"typeId","in":"path","required":true,"schema":{"type":"integer"},"description":"Object's type"},{"name":"objectId","in":"path","required":true,"schema":{"type":"string"},"description":"Object id to be checked. \nCould be any type of objects Tradeshift supports (e.g. documentId, dispatchId, conversationId etc.)\n"}],"get":{"responses":{"204":{"description":"User has access to the provided details"},"401":{"description":"User do not have access to the provided details","content":{"application/json":{"example":{"ErrorCode":"Unauthorized","Message":"The user was not authorized to perform the operation&#x3a; 37617bf8&#x2d;4e04&#x2d;41f2&#x2d;bd27&#x2d;9ad9153419ee&#x2f;Operation&#x28;id&#x3d;15&#x2c; name&#x3d;ADMIN&#x5f;ID&#x29; on 35dea17e&#x2d;fdd7&#x2d;46d9&#x2d;88c8&#x2d;c5c632ebf92b","ErrorDetail":[{"Key":"userUuid","Value":"37617bf8-4e04-41f2-bd27-9ad9153419ee"},{"Key":"securityGroupUuid","Value":"35dea17e-fdd7-46d9-88c8-c5c632ebf92b"},{"Key":"operationId","Value":"15"},{"Key":"operationName","Value":"ADMIN_ID"},{"Key":"stacktrace","Value":""}],"ValidationError":[],"RequestId":"92463020-1aa1-48c6-b87f-ad8b97d0599e"},"schema":{"title":"Tradeshift Public API 1.0 - TradeshiftException","required":["ErrorCode","Message","RequestId"],"type":"object","additionalProperties":false,"properties":{"ErrorCode":{"type":"string"},"Message":{"type":"string"},"ErrorDetail":{"type":"array","items":{"type":"object","additionalProperties":false,"properties":{"Key":{"type":"string"},"Value":{"type":"string"}},"required":["Key","Value"]}},"ValidationError":{"type":"array","items":{"type":"object"}},"RequestId":{"pattern":"^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$","description":"String representation of an Universally unique identifier (UUID), version 5. See RFC 4122","type":"string"}}}}}}},"description":"Check if an user identified by the tenantId and actorId is able to access the objectId of the type typeId.\nThe operation provided should exist through the list of allowed operations for the role assigned to the user.\nThe result takes into consideration also the DocumentAccess settings, if the app is enabled.\n","operationId":"get-rest-external-accesslist-operation-operationid-type-typeid-object-objectid","parameters":[],"x-annotation-dx-category":"accounts-company","summary":"Check authorization","tags":["dx-category--accounts-company"]}},"/rest/external/account":{"get":{"responses":{"200":{"description":"Details about the current company account","content":{"application/json":{"example":{"CompanyName":"ELTEC Inc. mkxezemhuirw","Country":"US","CompanyAccountId":"16e61501-2e6a-42ae-9bb3-67d1c1468056","State":"ACTIVE","Identifiers":[{"scheme":"TS:VAT","value":"eltec.mkxezemhuirw"}],"AddressLines":[],"RegistrationAddressLines":[],"AcceptingDocumentProfiles":[],"LookingFor":[],"Offering":[],"PublicProfile":false,"NonuserInvoicing":false,"AutoAcceptConnections":false,"Restricted":true,"Created":"2017-12-12T14:07:43.945Z","Modified":"2017-12-12T14:07:44.342Z","AccountType":"FREE"},"schema":{"type":"object","properties":{"CompanyName":{"title":"The Companyname Schema.","default":"","description":"An explanation about the purpose of this instance.","type":"string"},"Country":{"title":"The Country Schema.","default":"","description":"An explanation about the purpose of this instance.","type":"string"},"CompanyAccountId":{"title":"The Companyaccountid Schema.","default":"","description":"An explanation about the purpose of this instance.","type":"string"},"State":{"title":"The State Schema.","default":"","description":"An explanation about the purpose of this instance.","type":"string"},"Identifiers":{"type":"array","items":{"type":"object","properties":{"scheme":{"title":"The Scheme Schema.","default":"","description":"An explanation about the purpose of this instance.","type":"string"},"value":{"title":"The Value Schema.","default":"","description":"An explanation about the purpose of this instance.","type":"string"}},"required":["scheme","value"]}},"AddressLines":{"type":"array","items":{"title":"Empty Object","description":"This accepts anything, as long as it's valid JSON.","type":"string"}},"AcceptingDocumentProfiles":{"type":"array","items":{"title":"Empty Object","description":"This accepts anything, as long as it's valid JSON.","type":"string"}},"LookingFor":{"type":"array","items":{"title":"Empty Object","description":"This accepts anything, as long as it's valid JSON.","type":"string"}},"Offering":{"type":"array","items":{"title":"Empty Object","description":"This accepts anything, as long as it's valid JSON.","type":"string"}},"PublicProfile":{"title":"The Publicprofile Schema.","default":false,"description":"An explanation about the purpose of this instance.","type":"boolean"},"NonuserInvoicing":{"title":"The Nonuserinvoicing Schema.","default":false,"description":"An explanation about the purpose of this instance.","type":"boolean"},"AutoAcceptConnections":{"title":"The Autoacceptconnections Schema.","default":false,"description":"An explanation about the purpose of this instance.","type":"boolean"},"Restricted":{"title":"The Restricted Schema.","default":false,"description":"An explanation about the purpose of this instance.","type":"boolean"},"Created":{"title":"The Created Schema.","default":"","description":"An explanation about the purpose of this instance.","type":"string"},"Modified":{"title":"The Modified Schema.","default":"","description":"An explanation about the purpose of this instance.","type":"string"},"AccountType":{"title":"The Accounttype Schema.","default":"","description":"An explanation about the purpose of this instance.","type":"string"},"LastActive":{"title":"Last Active timestamp","default":"","description":"Timestamp of the last activity of the account","type":"string"}},"required":["CompanyName","Country","CompanyAccountId","State","Identifiers","AddressLines","AcceptingDocumentProfiles","LookingFor","Offering","PublicProfile","NonuserInvoicing","AutoAcceptConnections","Restricted","Created","Modified","AccountType","LastActive"]}}}}},"description":"Get information about the company account that is currently being accessed.","operationId":"get-rest-external-account","x-annotation-dx-category":"accounts-company","summary":"get account info","tags":["dx-category--accounts-company"]},"put":{"responses":{"204":{"description":"Update company information for the current company account."},"400":{"description":"Invalid company name, company account id or identifier"}},"description":"Update company information for the current company account. Properties will not be changed using this resource.","operationId":"put-rest-external-account","requestBody":{"content":{"text/xml":{"example":"<CompanyAccountInfo xmlns=\"http://tradeshift.com/api/public/1.0\">\n    <CompanyName>${companyName}</CompanyName>\n    <Country>US</Country>\n    <CompanyAccountId>813a3b75-a926-4e82-bd2b-a283b3b4bc6a</CompanyAccountId>\n    <State>ACTIVE</State>\n    <Identifiers>\n        <Identifier scheme=\"TS:ID\">96d47166-0abd-41c7-aae3-661ab060cb6b</Identifier>\n    </Identifiers>\n    <AddressLines>\n        <AddressLine scheme=\"buildingnumber\">1</AddressLine>\n        <AddressLine scheme=\"city\">San Francisco</AddressLine>\n        <AddressLine scheme=\"state\">CA</AddressLine>\n        <AddressLine scheme=\"street\">test8 street</AddressLine>\n        <AddressLine scheme=\"zip\">94116</AddressLine>\n    </AddressLines>\n    <RegistrationAddressLines>\n        <RegistrationAddressLine scheme=\"buildingnumber\">Registration Building</RegistrationAddressLine>\n        <RegistrationAddressLine scheme=\"city\">Registration City</RegistrationAddressLine>\n        <RegistrationAddressLine scheme=\"state\">Registration State</RegistrationAddressLine>\n        <RegistrationAddressLine scheme=\"street\">Registration Street</RegistrationAddressLine>\n        <RegistrationAddressLine scheme=\"zip\">Registration Zip</RegistrationAddressLine>\n    </RegistrationAddressLines>\n    <AcceptingDocumentProfiles/>\n    <LookingFor/>\n    <Offering/>\n    <PublicProfile>false</PublicProfile>\n    <NonuserInvoicing>false</NonuserInvoicing>\n    <AutoAcceptConnections>false</AutoAcceptConnections>\n    <Restricted>true</Restricted>\n    <Created>2017-02-27T16:15:31.059-08:00</Created>\n    <Modified>2017-03-05T18:36:48.811-08:00</Modified>\n    <AccountType>FREE</AccountType>\n</CompanyAccountInfo>","schema":{"type":"object"}}},"required":true},"x-annotation-dx-category":"accounts-company","summary":"update account info","tags":["dx-category--accounts-company"]}},"/rest/external/account/branches":{"get":{"responses":{"200":{"description":"","content":{"application/json":{"schema":{"example":{"numPages":"0","pageId":"0","itemsPerPage":"0","itemCount":"0","CompanyAccount":[]}}}}}},"description":"Get listing of branches for the current company account, if any.","operationId":"get-rest-external-account-branches","x-annotation-dx-category":"accounts-branches","summary":"get branches","tags":["dx-category--accounts-branches"]}},"/rest/external/account/branches/new":{"put":{"responses":{"204":{"description":"Created a new company account and optionally user."},"400":{"description":"The tenant identifier proposed does already exist on the platform and no tenant nor user was created.\n"}},"description":"Creates a company account as the child of the current account using the provided data in the body of the PUT call. The branch will automatically be activated and no activation email will be sent to any branch users attached to the create request. The identifier(s) must not already exist.\n","operationId":"put-rest-external-account-branches-new","requestBody":{"content":{"application/json":{"example":{"User":{"Id":"0daab548-3990-41ed-b0f4-eb197e693df1","Person":{"Email":"steve.armstrong@example.org"},"ReturnUrl":"https://go.tradeshift.com","Language":"en-us","TimeZone":"GMT","Visible":true},"CompanyAccount":{"Company":{"CompanyName":"Example Inc.","Country":"US","Identifier":[{"scheme":"TS:ID","value":"f54bca78-3ac9-4843-ae4a-f6808c0ea477"}]}},"ParentCompanyAccountId":"e3e1e302-ea34-416c-8236-248295ef7a8c"},"schema":{"title":"Tradeshift public API 1.0 - CreateBranchAccountRequest","required":["User","CompanyAccount","ParentCompanyAccountId"],"type":"object","additionalProperties":false,"properties":{"User":{"type":"object","properties":{"Id":{"pattern":"^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$","description":"String representation of an Universally unique identifier (UUID), version 5. See RFC 4122","type":"string"}},"required":["Id"]},"CompanyAccount":{"type":"object","properties":{"Company":{"type":"object"}},"required":["Company"]},"From":{"type":"string"},"SendActivationEmail":{"type":"boolean"},"ParentCompanyAccountId":{"pattern":"^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$","description":"String representation of an Universally unique identifier (UUID), version 5. See RFC 4122","type":"string"},"Properties":{"type":"object","properties":{"termsandconditions":{"type":"string"}},"required":["termsandconditions"]}}}}},"required":true},"x-annotation-dx-category":"accounts-branches","summary":"create branch","tags":["dx-category--accounts-branches"]}},"/rest/external/account/branches/{companyId}":{"parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"string"},"description":"UUID identifier of company account."}],"get":{"responses":{"200":{"description":"","content":{"application/json":{"schema":{"example":{"Id":"58a5b768-08be-48ec-a06d-6874fde8cf46","State":"CREATED","Company":{"CompanyName":null,"Country":null,"Created":null,"Modified":null,"Identifier":null,"AddressLine":null,"Phone":null,"Fax":null,"LegalCompanyStructure":null,"AddressAvailable":null,"RegistrationAddress":null},"Url":"str","Description":"str","ShortUrl":"str","PublicProfile":"false","NonuserInvoicing":"false","AutoAcceptConnections":"false","Restricted":"false","Property":null,"Offering":null,"LookingFor":null,"Industry":"ACADEMIA","OtherIndustry":"str","OwnershipType":"SOLE","Size":"ONE","NumConnections":"0","PrimaryBankAccount":{"channelCode":"str","branchId":"str","paymentNote":"str","institutionId":"str","institutionName":"str","branchName":"str","value":"str","beneficiaryName":"str","beneficiaryBankAddress":"str","accountTypeCode":"str"},"AccountType":"FREE","RegisteredGLI":[]}}}}},"404":{"description":"Specific branch isn't found or isn't a branch of the current parent."}},"description":"Get specific branch for the current parent","operationId":"get-rest-external-account-branches-companyid","x-annotation-dx-category":"accounts-branches","summary":"get branch","tags":["dx-category--accounts-branches"]}},"/rest/external/account/info":{"get":{"responses":{"200":{"description":"","content":{"application/json":{"schema":{"example":{"CompanyName":"str","Country":"str","CompanyAccountId":"58a5b768-08be-48ec-a06d-6874fde8cf46","State":"CREATED","Url":"str","Description":"str","Identifiers":[],"AddressLines":[],"AcceptingDocumentProfiles":[],"Properties":[],"LookingFor":null,"Offering":null,"LogoURL":"str","BackgroundURL":"str","PublicProfile":"false","NonuserInvoicing":"false","AutoAcceptConnections":"false","Restricted":"false","NumConnections":"0","Industry":"ACADEMIA","OtherIndustry":"str","OwnershipType":"SOLE","Size":"ONE","Created":"2013-07-23T07:35:16.000Z","Modified":"2013-07-23T07:35:16.000Z","Phone":"str","Fax":"str","ShortUrl":"str","AccountType":"FREE","LastActive":"2013-07-23T07:35:16.000Z"}}}}}},"description":"Returns information about the company account that is currently being accessed.","operationId":"get-rest-external-account-info","x-annotation-dx-category":"accounts-company","summary":"get account info","tags":["dx-category--accounts-company"]},"put":{"responses":{"204":{"description":""}},"description":"Update company information for the current company account. Properties will not be changed using this resource.","operationId":"put-rest-external-account-info","requestBody":{"content":{"application/json":{"example":{"CompanyName":"str","Country":"str","CompanyAccountId":"58a5b768-08be-48ec-a06d-6874fde8cf46","State":"CREATED","Url":"str","Description":"str","Identifiers":[],"AddressLines":[],"AcceptingDocumentProfiles":[],"Properties":[],"LookingFor":null,"Offering":null,"LogoURL":"str","BackgroundURL":"str","PublicProfile":"false","NonuserInvoicing":"false","AutoAcceptConnections":"false","Restricted":"false","NumConnections":"0","Industry":"ACADEMIA","OtherIndustry":"str","OwnershipType":"SOLE","Size":"ONE","Created":"2013-07-23T07:35:16.000Z","Modified":"2013-07-23T07:35:16.000Z","Phone":"str","Fax":"str","ShortUrl":"str","AccountType":"FREE","LastActive":"2013-07-23T07:35:16.000Z"},"schema":{"type":"string"}}},"required":true},"x-annotation-dx-category":"accounts-company","summary":"update account info","tags":["dx-category--accounts-company"]}},"/rest/external/account/info/user":{"get":{"responses":{"200":{"description":"","content":{"application/json":{"example":{"Id":"413a8273-d83d-42e0-9942-c6959505079c","CompanyName":"ELTEC Inc. mfbqdqmyyyep","Username":"steve.armstrong@mfbqdqmyyyep.eltec.test.ts.sv","Language":"en-us","TimeZone":"America/Los_Angeles","Memberships":[{"UserId":"ff028804-9fc4-4894-ad03-3b27dcd5458c","GroupId":"7066241f-e414-493d-acae-a3f98f0432cc","Role":"a6a3edcd-00d9-427c-bf03-4ef0112ba16d"}],"Created":"2017-12-12T14:26:02.339Z","State":"ACTIVE","Type":"PERSON","FirstName":"Steve","LastName":"Armstrong","Visible":true},"schema":{"title":"Tradeshift Public API 1.0 - UserAccountList","type":"object","properties":{"Id":{"title":"The Id Schema.","default":"","description":"An explanation about the purpose of this instance.","type":"string"},"CompanyName":{"title":"The Companyname Schema.","default":"","description":"An explanation about the purpose of this instance.","type":"string"},"Username":{"title":"The Username Schema.","default":"","description":"An explanation about the purpose of this instance.","type":"string"},"Language":{"title":"The Language Schema.","default":"","description":"An explanation about the purpose of this instance.","type":"string"},"TimeZone":{"title":"The Timezone Schema.","default":"","description":"An explanation about the purpose of this instance.","type":"string"},"Memberships":{"type":"array","items":{"type":"object","properties":{"UserId":{"title":"The Userid Schema.","default":"","description":"An explanation about the purpose of this instance.","type":"string"},"GroupId":{"title":"The Groupid Schema.","default":"","description":"An explanation about the purpose of this instance.","type":"string"},"Role":{"title":"The Role Schema.","default":"","description":"An explanation about the purpose of this instance.","type":"string"}},"required":["UserId","GroupId","Role"]}},"Created":{"title":"The Created Schema.","default":"","description":"An explanation about the purpose of this instance.","type":"string"},"State":{"title":"The State Schema.","default":"","description":"An explanation about the purpose of this instance.","type":"string"},"Type":{"title":"The Type Schema.","default":"","description":"An explanation about the purpose of this instance.","type":"string"},"FirstName":{"title":"The Firstname Schema.","default":"","description":"An explanation about the purpose of this instance.","type":"string"},"LastName":{"title":"The Lastname Schema.","default":"","description":"An explanation about the purpose of this instance.","type":"string"},"Visible":{"title":"The Visible Schema.","default":false,"description":"An explanation about the purpose of this instance.","type":"boolean"}},"required":["Id","CompanyName","Username","Language","TimeZone","Memberships","Created","State","Type","FirstName","LastName","Visible"]}}}}},"description":"Returns information about the user account currently accessing the system. Be aware that under normal circumstances, this will be a special app user, not the user who has installed an app.","operationId":"get-rest-external-account-info-user","x-annotation-dx-category":"users-accounts","summary":"get user info","tags":["dx-category--users-accounts"]}},"/rest/external/account/members/{userId}":{"parameters":[{"name":"userId","in":"path","required":true,"schema":{"type":"string"},"description":"UUID identifier of user account."}],"delete":{"responses":{"204":{"description":""}},"description":"Remove a member from the current company account. Users who belong to the account (have the account's CompanyAccountId) cannot be removed.","operationId":"delete-rest-external-account-members-userid","x-annotation-dx-category":"users-memberships","summary":"remove user","tags":["dx-category--users-memberships"]}},"/rest/external/account/parent":{"get":{"responses":{"200":{"description":"","content":{"application/json":{"schema":{"example":{"CompanyName":"str","Country":"str","CompanyAccountId":"58a5b768-08be-48ec-a06d-6874fde8cf46","State":"CREATED","Url":"str","Description":"str","Identifiers":[],"AddressLines":[],"AcceptingDocumentProfiles":[],"Properties":[],"LookingFor":null,"Offering":null,"LogoURL":"str","BackgroundURL":"str","PublicProfile":"false","NonuserInvoicing":"false","AutoAcceptConnections":"false","Restricted":"false","NumConnections":"0","Industry":"ACADEMIA","OtherIndustry":"str","OwnershipType":"SOLE","Size":"ONE","Created":"2013-07-23T07:35:16.000Z","Modified":"2013-07-23T07:35:16.000Z","Phone":"str","Fax":"str","ShortUrl":"str","AccountType":"FREE","LastActive":"2013-07-23T07:35:16.000Z"}}}}},"404":{"description":""}},"description":"Returns information about the parent account of the current account (the parent is the account of which the current account is a branch).","operationId":"get-rest-external-account-parent","x-annotation-dx-category":"accounts-branches","summary":"get parent","tags":["dx-category--accounts-branches"]}},"/rest/external/account/public/users":{"get":{"responses":{"200":{"description":"","content":{"application/json":{"schema":{"example":{"itemsPerPage":25,"itemCount":1,"numPages":1,"pageId":0,"UserAccounts":[{"Id":"e7eb4520-34f6-48c3-8982-024366454ba4","CompanyAccountId":"b289b086-c96f-4b09-a0e9-300631948601","CompanyName":"ELTEC Inc. jvuvlsxwdzlh","Username":"steve.armstrong@jvuvlsxwdzlh.eltec.test.ts.sv","Language":"en-us","TimeZone":"America/Los_Angeles","Memberships":[{"UserId":"e7eb4520-34f6-48c3-8982-024366454ba4","GroupId":"b289b086-c96f-4b09-a0e9-300631948601","Role":"a6a3edcd-00d9-427c-bf03-4ef0112ba16d"}],"Created":"2017-04-04T10:58:54.585+02:00","State":"ACTIVE","Type":"PERSON","FirstName":"Steve","LastName":"Armstrong","Visible":true}],"PrimaryUser":"e7eb4520-34f6-48c3-8982-024366454ba4"}}}}},"404":{"description":""}},"description":"Searches visible users in all companies (not only the current account) for the query string.","operationId":"get-rest-external-account-public-users","parameters":[{"name":"q","in":"query","required":true,"description":"User to search for","schema":{"type":"string"}},{"name":"limit","in":"query","required":true,"description":"Page size per query","schema":{"default":10,"type":"integer"}},{"name":"page","in":"query","description":"Page number of the query","schema":{"default":0,"type":"integer"}}],"x-annotation-dx-category":"users-accounts","summary":"find public users","tags":["dx-category--users-accounts"]}},"/rest/external/account/taxes":{"get":{"responses":{"200":{"description":"","content":{"application/json":{"schema":{"example":{"StackedTaxes":[],"DefaultTaxIndex":"0"}}}}},"404":{"description":""}},"description":"Get tax categories. Lists the company taxes for the requesting context, if connectionID is specified it will also include the default tax from the connection properties.","operationId":"get-rest-external-account-taxes","parameters":[{"name":"connectionID","in":"query","required":true,"description":"Connection to get tax categories for.","schema":{"type":"string"}}],"x-annotation-dx-category":"accounts-taxes","summary":"get taxes","tags":["dx-category--accounts-taxes"]},"put":{"responses":{"204":{"description":""},"404":{"description":""}},"description":"Update tax categories.","operationId":"put-rest-external-account-taxes","x-annotation-dx-category":"accounts-taxes","summary":"update taxes","tags":["dx-category--accounts-taxes"]}},"/rest/external/account/users":{"get":{"responses":{"200":{"description":"","content":{"application/json":{"schema":{"example":{"itemsPerPage":25,"itemCount":1,"numPages":1,"pageId":0,"UserAccounts":[{"Id":"e7eb4520-34f6-48c3-8982-024366454ba4","CompanyAccountId":"b289b086-c96f-4b09-a0e9-300631948601","CompanyName":"ELTEC Inc. jvuvlsxwdzlh","Username":"steve.armstrong@jvuvlsxwdzlh.eltec.test.ts.sv","Language":"en-us","TimeZone":"America/Los_Angeles","Memberships":[{"UserId":"e7eb4520-34f6-48c3-8982-024366454ba4","GroupId":"b289b086-c96f-4b09-a0e9-300631948601","Role":"a6a3edcd-00d9-427c-bf03-4ef0112ba16d"}],"Created":"2017-04-04T10:58:54.585+02:00","State":"ACTIVE","Type":"PERSON","FirstName":"Steve","LastName":"Armstrong","Visible":true}],"PrimaryUser":"e7eb4520-34f6-48c3-8982-024366454ba4"}}}}},"404":{"description":""}},"description":"Get a list of users associated with the current account.","operationId":"get-rest-external-account-users","parameters":[{"name":"visible","in":"query","required":true,"description":"If true, only display users that are visible to everybody in a network.","schema":{"default":true,"type":"boolean"}},{"name":"limit","in":"query","required":true,"description":"Page size per query","schema":{"default":25,"type":"integer"}},{"name":"page","in":"query","description":"Page number of the query","schema":{"default":0,"type":"integer"}}],"x-annotation-dx-category":"users-accounts","summary":"get users","tags":["dx-category--users-accounts"]}},"/rest/external/account/users/byemail/{email}":{"parameters":[{"name":"email","in":"path","required":true,"schema":{"type":"string"},"description":"Email of user being requested"}],"get":{"responses":{"200":{"description":"","content":{"application/json":{"schema":{"example":{"Id":"bc537c59-6c8c-49d0-bc24-14b6d676b106","Person":{"Created":"2016-09-27T10:49:45.739+02:00","FirstName":"Dwight","LastName":"Schrute","Email":"dwight.schrute@dundermifflin.com"},"CompanyAccountId":"87b14576-04f6-480c-a4fd-8f692dd89fa8","UserName":"dwight.schrute@dundermifflin.com","Credentials":[],"State":"ACTIVE","Language":"en-us","Kind":"PERSON","TimeZone":"America/New_York","Visible":false,"OverridingCompanyAccountId":"87b14576-04f6-480c-a4fd-8f692dd89fa8"}}}}},"404":{"description":""}},"description":"Find if a user exists inside a company. Case insensitive.","operationId":"get-rest-external-account-users-byemail-email","parameters":[{"name":"searchparent","in":"query","description":"If true, search parent account as well.","schema":{"default":false,"type":"boolean"}},{"name":"searchlocked","in":"query","description":"If true, search locked account as well.","schema":{"default":true,"type":"boolean"}}],"x-annotation-dx-category":"users-accounts","summary":"get user by email","tags":["dx-category--users-accounts"]}},"/rest/external/account/users/{userId}":{"parameters":[{"name":"userId","in":"path","required":true,"schema":{"type":"string"},"description":"UUID identifier of user account."}],"get":{"responses":{"200":{"description":"","content":{"text/xml":{"example":"<UserAccountInfo xmlns=\"http://tradeshift.com/api/public/1.0\">\n    <Id>69c772e7-b177-4621-8bb0-c1b3768adcd5</Id>\n    <CompanyAccountId>f54bca78-3ac9-4843-ae4a-f6808c0ea477</CompanyAccountId>\n    <CompanyName>ELTEC Inc.</CompanyName>\n    <Username>steve.armstrong@example.com</Username>\n    <Language>en-us</Language>\n    <TimeZone>America/Los_Angeles</TimeZone>\n    <Memberships>\n        <Membership>\n            <UserId>69c772e7-b177-4621-8bb0-c1b3768adcd5</UserId>\n            <GroupId>cfacdb6c-abef-46bd-9283-098387ac9e03</GroupId>\n            <Role>a6a3edcd-00d9-427c-bf03-4ef0112ba16d</Role>\n        </Membership>\n    </Memberships>\n    <Created>2017-05-08T13:24:36.710+02:00</Created>\n    <State>ACTIVE</State>\n    <Type>PERSON</Type>\n    <FirstName>Steve</FirstName>\n    <LastName>Armstrong</LastName>\n    <Visible>true</Visible>\n</UserAccountInfo>\n","schema":{"type":"object"}}}}},"description":"Gets account information to requested user. Sensitive info is disclosed within the same company or between companies that are mutually connected.","operationId":"get-rest-external-account-users-userid","x-annotation-dx-category":"users-accounts","summary":"get user by id","tags":["dx-category--users-accounts"]},"put":{"responses":{"204":{"description":"The user was updated/created successfully."},"404":{"description":""}},"description":"Create or update a user inside the current company account","operationId":"put-rest-external-account-users-userid","requestBody":{"content":{"application/json":{"example":{"Id":"413a8273-d83d-42e0-9942-c6959505079c","CompanyAccountId":"513a8273-d83d-42e0-9942-c6959505079a","CompanyName":"ELTEC Inc. mfbqdqmyyyep","Username":"steve.armstrong@mfbqdqmyyyep.eltec.test.ts.sv","Language":"en-us","TimeZone":"America/Los_Angeles","Memberships":[{"UserId":"ff028804-9fc4-4894-ad03-3b27dcd5458c","GroupId":"7066241f-e414-493d-acae-a3f98f0432cc","Role":"a6a3edcd-00d9-427c-bf03-4ef0112ba16d"}],"Created":"2017-12-12T14:26:02.339Z","State":"ACTIVE","Type":"PERSON","FirstName":"Steve","LastName":"Armstrong","Title":"Mr.","PictureUrl":"theUrl","Visible":true,"RoleId":"a6a3edcd-00d9-427c-bf03-4ef0112ba16d","Password":"theSecretSauce"},"schema":{"required":["Id","CompanyAccountId","CompanyName","Username","Language","Created","FirstName","LastName"],"type":"object","properties":{"Id":{"type":"string"},"CompanyAccountId":{"type":"string"},"CompanyName":{"type":"string"},"Username":{"type":"string"},"Language":{"type":"string"},"TimeZone":{"type":"string"},"Memberships":{"type":"array","items":{"required":["UserId","GroupId","Role"],"type":"object","properties":{"UserId":{"type":"string"},"GroupId":{"type":"string"},"Role":{"type":"string"}}}},"Created":{"type":"string"},"State":{"type":"string"},"Type":{"type":"string"},"FirstName":{"maxLength":128,"type":"string"},"LastName":{"maxLength":128,"type":"string"},"Title":{"type":"string"},"PictureUrl":{"type":"string"},"Visible":{"type":"boolean"},"RoleId":{"type":"string"},"Password":{"type":"string"}}}}},"required":true},"x-annotation-dx-category":"users-accounts","summary":"update user by id","tags":["dx-category--users-accounts"]}},"/rest/external/account/users/{userId}/images/{name}":{"parameters":[{"name":"userId","in":"path","required":true,"schema":{"type":"string"},"description":"UUID identifier of user account."},{"name":"name","in":"path","required":true,"schema":{"type":"string"},"description":"Unique name of image."}],"get":{"responses":{"200":{"description":""},"304":{"description":""},"307":{"description":""},"404":{"description":""}},"description":"Returns image by user and image name.","operationId":"get-rest-external-account-users-userid-images-name","parameters":[{"name":"Accept","in":"header","required":true,"description":"The mime-type of the image","schema":{"type":"string"}},{"name":"height","in":"query","description":"The height of the image","schema":{"default":0,"type":"number"}},{"name":"width","in":"query","description":"The width of the image","schema":{"default":0,"type":"number"}}],"x-annotation-dx-category":"users-profile_images","summary":"get user image","tags":["dx-category--users-profile_images"]},"put":{"responses":{"201":{"description":""},"406":{"description":""},"502":{"description":""}},"description":"Save an image by user and image name","operationId":"put-rest-external-account-users-userid-images-name","parameters":[{"name":"Content-Type","in":"header","required":true,"description":"The mime-type of the image","schema":{"type":"string"}}],"x-annotation-dx-category":"users-profile_images","summary":"save user image","tags":["dx-category--users-profile_images"]},"delete":{"responses":{"204":{"description":""},"404":{"description":""}},"description":"Removes image that matches user and image name parameters.","operationId":"delete-rest-external-account-users-userid-images-name","x-annotation-dx-category":"users-profile_images","summary":"remove user image","tags":["dx-category--users-profile_images"]}},"/rest/external/account/users/{userId}/role":{"parameters":[{"name":"userId","in":"path","required":true,"schema":{"type":"string"},"description":"UUID identifier of user account."}],"put":{"responses":{"204":{"description":""},"403":{"description":""}},"description":"Create a membership for the given user, group and role deleting all the existing group's memberships.","operationId":"put-rest-external-account-users-userid-role","x-annotation-dx-category":"users-memberships","summary":"replace roles","tags":["dx-category--users-memberships"]}},"/rest/external/account/users/{userId}/state":{"parameters":[{"name":"userId","in":"path","required":true,"schema":{"type":"string"},"description":"UUID identifier of user account."}],"put":{"responses":{"204":{"description":""},"403":{"description":""}},"description":"Set the state of a user.","operationId":"put-rest-external-account-users-userid-state","requestBody":{"content":{"text/plain":{"example":"LOCKED","schema":{"type":"string"}}},"required":true},"x-annotation-dx-category":"users-memberships","summary":"set user state","tags":["dx-category--users-memberships"]}},"/rest/external/account/validations":{"get":{"responses":{"200":{"description":"","content":{"application/json":{"schema":{"example":{"numPages":"0","pageId":"0","itemsPerPage":"0","itemCount":"0","DynamicValidation":[]}}}}},"403":{"description":"If the feature is not available for this account."}},"description":"Gets a dynamic validation, by External (enterprise) ID. Only available when the relevant features have been enabled for the account.","operationId":"get-rest-external-account-validations","parameters":[{"name":"id","in":"query","required":true,"description":"External (enterprise) ID","schema":{"type":"string"}}],"x-annotation-dx-category":"accounts-validations","summary":"get validations","tags":["dx-category--accounts-validations"]},"put":{"responses":{"204":{"description":""},"403":{"description":"If the feature is not available for this account."}},"description":"Saves a dynamic validation, by External (enterprise) ID. Only available when the relevant features have been enabled for the account.","operationId":"put-rest-external-account-validations","parameters":[{"name":"id","in":"query","required":true,"description":"External (enterprise) ID","schema":{"type":"string"}}],"x-annotation-dx-category":"accounts-validations","summary":"update validations","tags":["dx-category--accounts-validations"]},"delete":{"responses":{"204":{"description":""},"403":{"description":"If the feature is not available for this account."}},"description":"Deletes a dynamic validation, by External (enterprise) ID. Only available when the relevant features have been enabled for the account.","operationId":"delete-rest-external-account-validations","parameters":[{"name":"id","in":"query","required":true,"description":"External (enterprise) ID","schema":{"type":"string"}}],"x-annotation-dx-category":"accounts-validations","summary":"remove validations","tags":["dx-category--accounts-validations"]}},"/rest/external/account/validations/historydata/{historicid}":{"parameters":[{"name":"historicid","in":"path","required":true,"schema":{"type":"string"},"description":"Identifier for historical data requested"}],"get":{"responses":{"200":{"description":"","content":{"application/json":{"schema":{"example":{"changes":"[B@68c2f2e3","created":"0","filename":"str","filesize":"0","id":"58a5b768-08be-48ec-a06d-6874fde8cf46"}}}}},"404":{"description":""}},"description":"Get dynamic validation changes file populated with content.","operationId":"get-rest-external-account-validations-historydata-historicid","x-annotation-dx-category":"accounts-validations","summary":"validation history","tags":["dx-category--accounts-validations"]}},"/rest/external/account/validations/list":{"get":{"responses":{"200":{"description":"","content":{"application/json":{"schema":{"example":{"numPages":"0","pageId":"0","itemsPerPage":"0","itemCount":"0","DynamicValidation":[]}}}}},"403":{"description":"If the feature is not available for this account."}},"description":"Returns all dynamic validations that have been created for the account. Only available when the relevant features have been enabled for the account.","operationId":"get-rest-external-account-validations-list","parameters":[{"name":"limit","in":"query","required":true,"description":"Page size per query","schema":{"default":25,"type":"integer"}},{"name":"page","in":"query","description":"Page number of the query","schema":{"default":0,"type":"integer"}}],"x-annotation-dx-category":"accounts-validations","summary":"list of validations","tags":["dx-category--accounts-validations"]}},"/rest/external/account/validations/log":{"get":{"responses":{"200":{"description":"","content":{"application/json":{"schema":{"example":{"numPages":"0","pageId":"0","itemsPerPage":"0","itemCount":"0","DynamicValidationEvents":[]}}}}},"404":{"description":"If no events are found."}},"description":"Returns dynamic validations event log for the account.","operationId":"get-rest-external-account-validations-log","parameters":[{"name":"after","in":"query","description":"List only events after this date.","schema":{"type":"string"}},{"name":"before","in":"query","description":"List only events before this date.","schema":{"type":"string"}},{"name":"limit","in":"query","required":true,"description":"Page size per query","schema":{"default":25,"type":"integer"}},{"name":"page","in":"query","description":"Page number of the query","schema":{"default":0,"type":"integer"}}],"x-annotation-dx-category":"accounts-validations","summary":"validation log","tags":["dx-category--accounts-validations"]}},"/rest/external/account/validations/usedvalues":{"get":{"responses":{"200":{"description":"","content":{"application/json":{"schema":{"example":{"numPages":"0","pageId":"0","itemsPerPage":"0","itemCount":"0","DynamicValidationEvents":[]}}}}},"404":{"description":"If no events are found."}},"description":"Returns dynamic validations event log for the account and validation/valueset.","operationId":"get-rest-external-account-validations-usedvalues","parameters":[{"name":"after","in":"query","description":"List only events after this date.","schema":{"type":"string"}},{"name":"before","in":"query","description":"List only events before this date.","schema":{"type":"string"}},{"name":"validationid","in":"query","required":true,"description":"Validation to pull events for.","schema":{"type":"string"}},{"name":"valuesetid","in":"query","required":true,"description":"Valueset to pull events for.","schema":{"type":"string"}}],"x-annotation-dx-category":"accounts-validations","summary":"validations used","tags":["dx-category--accounts-validations"]}},"/rest/external/account/validations/values":{"get":{"responses":{"200":{"description":"","content":{"application/json":{"schema":{"example":{"numPages":"0","pageId":"0","itemsPerPage":"0","itemCount":"0","DynamicValidationValues":[]}}}}},"404":{"description":"If no dynamic validations are found."}},"description":"List values currently registered for a given dynamic validation, by the id of the dynamic validation","operationId":"get-rest-external-account-validations-values","parameters":[{"name":"validationid","in":"query","required":true,"description":"Identifier of the dynamic validation","schema":{"type":"string"}},{"name":"fieldid","in":"query","description":"Identifier of the field in the dynamic validation","schema":{"type":"string"}},{"name":"search","in":"query","description":"Query string to search","schema":{"type":"string"}},{"name":"limit","in":"query","required":true,"description":"Page size per query","schema":{"default":25,"type":"integer"}},{"name":"page","in":"query","description":"Page number of the query","schema":{"default":0,"type":"integer"}}],"x-annotation-dx-category":"accounts-validations","summary":"validation values","tags":["dx-category--accounts-validations"]}},"/rest/external/account/validations/valuesets":{"get":{"responses":{"200":{"description":"","content":{"application/json":{"schema":{"example":{"numPages":"0","pageId":"0","itemsPerPage":"0","itemCount":"0","DynamicValidationValues":[]}}}}},"404":{"description":"If no dynamic validations are found."}},"description":"List value sets registered for a given dynamic validation, without retrieving actual values.","operationId":"get-rest-external-account-validations-valuesets","parameters":[{"name":"search","in":"query","description":"Query string to search","schema":{"type":"string"}},{"name":"limit","in":"query","required":true,"description":"Page size per query","schema":{"default":25,"type":"integer"}},{"name":"page","in":"query","description":"Page number of the query","schema":{"default":0,"type":"integer"}}],"x-annotation-dx-category":"accounts-validations","summary":"validation value sets","tags":["dx-category--accounts-validations"]}},"/rest/external/account/validations/{dynamicvalidationinternalid}/values":{"parameters":[{"name":"dynamicvalidationinternalid","in":"path","required":true,"schema":{"type":"string"},"description":"Identifier for dynamic validation"}],"get":{"responses":{"200":{"description":"","content":{"application/json":{"schema":{"example":{"numPages":"0","pageId":"0","itemsPerPage":"0","itemCount":"0","DynamicValidationValues":[]}}}}},"404":{"description":"If no dynamic validations are found."}},"description":"List all values currently registered for a given dynamic validation.","operationId":"get-rest-external-account-validations-dynamicvalidationinternalid-values","parameters":[{"name":"search","in":"query","description":"Query string to search","schema":{"type":"string"}},{"name":"limit","in":"query","required":true,"description":"page size per query","schema":{"default":25,"type":"integer"}},{"name":"page","in":"query","description":"page number of the query","schema":{"default":0,"type":"integer"}}],"x-annotation-dx-category":"accounts-validations","summary":"validation by id","tags":["dx-category--accounts-validations"]}},"/rest/external/account/{companyId}":{"parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"string"},"description":"UUID identifier of company account."}],"get":{"responses":{"200":{"description":"The account was found and returned.","content":{"application/json":{"schema":{"example":{"CompanyName":"str","Country":"str","CompanyAccountId":"58a5b768-08be-48ec-a06d-6874fde8cf46","State":"CREATED","Url":"str","Description":"str","Identifiers":[],"AddressLines":[],"AcceptingDocumentProfiles":[],"Properties":[],"LookingFor":null,"Offering":null,"LogoURL":"str","BackgroundURL":"str","PublicProfile":"false","NonuserInvoicing":"false","AutoAcceptConnections":"false","Restricted":"false","NumConnections":"0","Industry":"ACADEMIA","OtherIndustry":"str","OwnershipType":"SOLE","Size":"ONE","Created":"2013-07-23T07:35:16.000Z","Modified":"2013-07-23T07:35:16.000Z","Phone":"str","Fax":"str","ShortUrl":"str","AccountType":"FREE","LastActive":"2013-07-23T07:35:16.000Z"}}}}},"204":{"description":"The account queried for did not exist. Empty response will be returned."}},"description":"Return account associated with companyId.","operationId":"get-rest-external-account-companyid","x-annotation-dx-category":"accounts-company","summary":"get company account","tags":["dx-category--accounts-company"]},"put":{"responses":{"204":{"description":""}},"description":"Update company information for the specified company account.","operationId":"put-rest-external-account-companyid","x-annotation-dx-category":"accounts-company","summary":"put company account","tags":["dx-category--accounts-company"]}},"/rest/external/account/{companyId}/users":{"parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"string"},"description":"Company (tenant) UUID identifier of company to administer TSGLI prefixes for."}],"get":{"responses":{"200":{"description":"List of the found users","content":{"application/json":{"example":{"itemsPerPage":25,"itemCount":1,"numPages":1,"pageId":0,"UserAccounts":[{"Id":"e7eb4520-34f6-48c3-8982-024366454ba4","CompanyAccountId":"b289b086-c96f-4b09-a0e9-300631948601","CompanyName":"ELTEC Inc. jvuvlsxwdzlh","Username":"steve.armstrong@jvuvlsxwdzlh.eltec.test.ts.sv","Language":"en-us","TimeZone":"America/Los_Angeles","Memberships":[{"UserId":"e7eb4520-34f6-48c3-8982-024366454ba4","GroupId":"b289b086-c96f-4b09-a0e9-300631948601","Role":"a6a3edcd-00d9-427c-bf03-4ef0112ba16d"}],"Created":"2017-04-04T10:58:54.585+02:00","State":"ACTIVE","Type":"PERSON","FirstName":"Steve","LastName":"Armstrong","Visible":true}],"PrimaryUser":"e7eb4520-34f6-48c3-8982-024366454ba4"},"schema":{"title":"Tradeshift Public API 1.0 - UserAccountList","type":"object","properties":{"itemsPerPage":{"type":"number"},"itemCount":{"type":"number"},"numPages":{"type":"number"},"pageId":{"type":"number"},"UserAccounts":{"type":"array","items":{"type":"object","properties":{"Id":{"pattern":"^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$","description":"String representation of an Universally unique identifier (UUID), version 5. See RFC 4122","type":"string"},"CompanyAccountId":{"type":"string"},"CompanyName":{"type":"string"},"Username":{"type":"string"},"Language":{"type":"string"},"TimeZone":{"type":"string"},"Memberships":{"type":"array","items":{"type":"object","properties":{"UserId":{"pattern":"^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$","description":"String representation of an Universally unique identifier (UUID), version 5. See RFC 4122","type":"string"},"GroupId":{"pattern":"^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$","description":"String representation of an Universally unique identifier (UUID), version 5. See RFC 4122","type":"string"},"Role":{"pattern":"^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$","description":"String representation of an Universally unique identifier (UUID), version 5. See RFC 4122","type":"string"}},"required":["UserId","GroupId","Role"]}},"Created":{"type":"string"},"State":{"type":"string"},"Type":{"type":"string"},"FirstName":{"type":"string"},"LastName":{"type":"string"},"Visible":{"type":"boolean"}},"required":["Id","CompanyAccountId","CompanyName","Username","Language","TimeZone","Memberships","Created","State","Type","FirstName","LastName","Visible"]}},"PrimaryUser":{"pattern":"^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$","description":"String representation of an Universally unique identifier (UUID), version 5. See RFC 4122","type":"string"}},"required":["itemsPerPage","itemCount","numPages","pageId","UserAccounts","PrimaryUser"]}}}},"404":{"description":""}},"description":"Searches for or lists the users in the requested company account","operationId":"get-rest-external-account-companyid-users","parameters":[{"name":"q","in":"query","description":"User to search for (optional)","schema":{"type":"string"}},{"name":"id","in":"query","description":"list of id's for users to return, if any id' are supplied the q, page and limit params will be ignored","schema":{"type":"string"}},{"name":"includeMemberships","in":"query","description":"adds membership info to found users","schema":{"default":true,"type":"boolean"}},{"name":"findMembers","in":"query","description":"consider membership in finding users","schema":{"default":false,"type":"boolean"}},{"name":"state","in":"query","description":"state - list of user states to query by, if left out default will be ACTIVE and CREATED","schema":{"type":"string"}},{"name":"limit","in":"query","description":"pagination limit","schema":{"default":25,"type":"integer"}},{"name":"page","in":"query","description":"Page number of the query","schema":{"default":0,"type":"integer"}}],"x-annotation-dx-category":"users-accounts","summary":"find users","tags":["dx-category--users-accounts"]}},"/rest/external/companies/{companyAccountId}/identifiers":{"parameters":[{"name":"companyAccountId","in":"path","required":true,"schema":{"type":"string"},"description":"UUID identifier of company (tenant)."}],"get":{"responses":{"200":{"description":"Get the company identifiers for the requested tenant","content":{"application/json":{"example":[{"scheme":"DE:MWST","value":"812529243","label":"Umsatzsteuer-Identifikationsnummer","partyTaxScheme":false,"toBePrinted":false},{"scheme":"DK:CVR","value":"27659721","label":"","partyTaxScheme":false,"toBePrinted":false}],"schema":{"title":"Tradeshift Public API 1.0 - CompanyIdentifiers List","type":"array","additionalProperties":false,"items":{"type":"object","properties":{"scheme":{"title":"Identifier scheme","type":"string"},"value":{"title":"Identifier value","type":"string"},"label":{"type":"string"},"partyTaxScheme":{"type":"boolean"},"toBePrinted":{"type":"boolean"}},"required":["scheme","value","label","partyTaxScheme","toBePrinted"]}}}}}},"description":"Return identifiers associated with the account with this companyId.","operationId":"get-rest-external-companies-companyaccountid-identifiers","x-annotation-dx-category":"accounts-company","summary":"get company identifiers","tags":["dx-category--accounts-company"]},"put":{"responses":{"200":{"description":"The company identifiers were replaced"},"400":{"description":""}},"description":"Update company identifiers for the specified company account.","operationId":"put-rest-external-companies-companyaccountid-identifiers","requestBody":{"content":{"application/json":{"example":[{"scheme":"DE:MWST","value":"812529243","label":"Umsatzsteuer-Identifikationsnummer","partyTaxScheme":false,"toBePrinted":false},{"scheme":"DK:CVR","value":"27659721","label":"","partyTaxScheme":false,"toBePrinted":false}],"schema":{"title":"Tradeshift Public API 1.0 - CompanyIdentifiers List","type":"array","additionalProperties":false,"items":{"type":"object","properties":{"scheme":{"title":"Identifier scheme","type":"string"},"value":{"title":"Identifier value","type":"string"},"label":{"type":"string"},"partyTaxScheme":{"type":"boolean"},"toBePrinted":{"type":"boolean"}},"required":["scheme","value","label","partyTaxScheme","toBePrinted"]}}}},"required":true},"x-annotation-dx-category":"accounts-company","summary":"replace company identifiers","tags":["dx-category--accounts-company"]}},"/rest/external/documentfiles":{"get":{"responses":{"200":{"description":"Lists document files.","content":{"text/xml":{"example":"<DocumentFileList xmlns=\"http://tradeshift.com/api/public/1.0\" itemCount=\"2\" itemsPerPage=\"0\" numPages=\"0\" pageId=\"0\">\n  <Items>\n    <Id>51e40da6-0116-11e4-9055-14109fe0cc3d</Id>\n    <FileName>my_test_invoice</FileName>\n    <MimeType>application/xml</MimeType>\n    <ActorId>51e40da6-0116-11e4-9055-14109fe0cc3d</ActorId>\n    <GroupId>51e40da6-0116-11e4-9055-14109fe0cc3d</GroupId>\n    <Created>2013-07-23T07:35:16.000Z</Created>\n    <Modified>2013-07-23T07:35:16.000Z</Modified>\n    <Validated>2013-07-23T07:35:16.000Z</Validated>\n    <Directory>outbox</Directory>\n    <DocumentId>51e40da6-0116-11e4-9055-14109fe0cc3d</DocumentId>\n    <FileSize>1024</FileSize>\n    <ValidationErrorsSize>42</ValidationErrorsSize>\n  </Items>\n  <Items>\n    <Id>51e40da6-0116-11e4-9055-14109fe0cc3d</Id>\n    <FileName>my_test_invoice</FileName>\n    <MimeType>application/xml</MimeType>\n    <ActorId>51e40da6-0116-11e4-9055-14109fe0cc3d</ActorId>\n    <GroupId>51e40da6-0116-11e4-9055-14109fe0cc3d</GroupId>\n    <Created>2013-07-23T07:35:16.000Z</Created>\n    <Modified>2013-07-23T07:35:16.000Z</Modified>\n    <Validated>2013-07-23T07:35:16.000Z</Validated>\n    <Directory>outbox</Directory>\n    <DocumentId>51e40da6-0116-11e4-9055-14109fe0cc3d</DocumentId>\n    <FileSize>1024</FileSize>\n    <ValidationErrorsSize>42</ValidationErrorsSize>\n  </Items>\n</DocumentFileList>\n","schema":{"type":"object"}}}},"400":{"description":""},"401":{"description":""},"404":{"description":"","content":{"text/xml":{"schema":{"example":"<ns6:ResponseError xmlns:cec=\"urn:oasis:names:specification:ubl:schema:xsd:CommonExtensionComponents-2\" xmlns:cac=\"urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2\" xmlns:cbc=\"urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2\" xmlns:ns6=\"http://tradeshift.com/api/1.0\" xmlns:ns20=\"urn:oasis:names:specification:ubl:schema:xsd:OrderResponseSimple-2\" xmlns:ns8=\"urn:oasis:names:specification:ubl:schema:xsd:ApplicationResponse-2\" xmlns:ns7=\"http://tradeshift.com/api/2.0\" xmlns:ns13=\"urn:oasis:names:specification:ubl:schema:xsd:CreditNote-2\" xmlns:ns9=\"urn:oasis:names:specification:ubl:schema:xsd:OrderCancellation-2\" xmlns:ns12=\"urn:oasis:names:specification:ubl:schema:xsd:Quotation-2\" xmlns:ns11=\"urn:oasis:names:specification:ubl:schema:xsd:Invoice-2\" xmlns:ns22=\"urn:oasis:names:specification:ubl:schema:xsd:RequestForQuotation-2\" xmlns:ns10=\"urn:oasis:names:specification:ubl:schema:xsd:DespatchAdvice-2\" xmlns:ns21=\"urn:oasis:names:specification:ubl:schema:xsd:OrderResponse-2\" xmlns:ns17=\"urn:oasis:names:specification:ubl:schema:xsd:RemittanceAdvice-2\" xmlns:ns16=\"urn:oasis:names:specification:ubl:schema:xsd:Reminder-2\" xmlns:ns15=\"urn:oasis:names:specification:ubl:schema:xsd:OrderChange-2\" xmlns:ns14=\"urn:oasis:names:specification:ubl:schema:xsd:Order-2\" xmlns:ns19=\"urn:oasis:names:specification:ubl:schema:xsd:Catalogue-2\" xmlns:ts=\"http://tradeshift.com/api/public/1.0\" xmlns:ns18=\"urn:oasis:names:specification:ubl:schema:xsd:ReceiptAdvice-2\">\n    <ns6:ErrorCode>ResourceNotFound</ns6:ErrorCode>\n    <ns6:Message>Error&amp;#x3a; ResourceNotFound&amp;#x3a; The object did not exist</ns6:Message>\n    <ns6:RequestId>fff29544-8039-499f-91c5-b3c9e4e3d8b1</ns6:RequestId>\n</ns6:ResponseError>\n"}}}}},"description":"Get array of document file objects.","operationId":"get-rest-external-documentfiles","parameters":[{"name":"since","in":"query","description":"Limits documents to those which have changed since the given timestamp, formatted as a ISO 8601 XSD-timestamp.\n","schema":{"type":"string"}},{"name":"createdAfter","in":"query","description":"List only those files that were created after this date.","schema":{"type":"string"}},{"name":"createdBefore","in":"query","description":"List only those files that were created before this date.","schema":{"type":"string"}},{"name":"limit","in":"query","description":"Number of files to be shown at once as part of the first page or for every page.","schema":{"default":100,"type":"integer"}},{"name":"noPaging","in":"query","description":"To disable any paging and either return all files or just the first few files as\nspecified by the limit parameter. This parameter supersedes the page parameter.\n","schema":{"default":false,"type":"boolean"}},{"name":"recursive","in":"query","description":"Recursively include subdirectories, accepted as values 'true' or 'false'.","schema":{"default":false,"type":"boolean"}},{"name":"directory","in":"query","required":true,"description":"The absolute path of the directory to list files from.","schema":{"type":"string"}},{"name":"listDirectories","in":"query","description":"List directory definitions including '.' and subdirectories.","schema":{"default":false,"type":"boolean"}},{"name":"fileNames","in":"query","description":"List of file names to look for.","schema":{"type":"string"}},{"name":"acceptAs","in":"query","description":"Regex file name patterns to use to search for files.","schema":{"type":"string"}},{"name":"state","in":"query","description":"The state of the document files to show; 'new' for non dispatched, 'failed', for ones\nwith validation errors, 'dispatched' for dispatched documents, 'dispatch_failed' for\nones where dispatch has failed.\n","schema":{"type":"string"}},{"name":"requireDocumentId","in":"query","description":"List only those files that have an associated document id.","schema":{"default":false,"type":"boolean"}},{"name":"page","in":"query","description":"Page number of the query","schema":{"default":0,"type":"integer"}}],"x-annotation-dx-category":"documents-document_files","summary":"find document files","tags":["dx-category--documents-document_files"]}},"/rest/external/documentfiles/directory":{"put":{"responses":{"204":{"description":"The directory was created."},"304":{"description":"A directory with the same path already exits."},"400":{"description":"The directory path supplied was not valid."},"403":{"description":"A directory cannot be created with this path."}},"description":"Create a new empty directory.","operationId":"put-rest-external-documentfiles-directory","parameters":[{"name":"directory","in":"query","required":true,"description":"Full path of directory to create.","schema":{"type":"string"}}],"x-annotation-dx-category":"documents-document_files","summary":"create directory","tags":["dx-category--documents-document_files"]},"delete":{"responses":{"204":{"description":"The directory was deleted."},"304":{"description":"The directory is not modified and therefore not deleted."},"400":{"description":"The directory path supplied was not valid."},"403":{"description":"User cannot delete this directory or directories on this path."},"404":{"description":"The directory that is to be deleted was not found."}},"description":"Deletes the directory passed as parameter, this will fail if the directory is not empty.","operationId":"delete-rest-external-documentfiles-directory","parameters":[{"name":"directory","in":"query","required":true,"description":"Full path of directory to delete.","schema":{"type":"string"}}],"x-annotation-dx-category":"documents-document_files","summary":"remove directory","tags":["dx-category--documents-document_files"]}},"/rest/external/documentfiles/{filename}/dispatcher":{"parameters":[{"name":"filename","in":"path","required":true,"schema":{"type":"string"},"description":"Original name of the document file to be renamed"}],"post":{"responses":{"201":{"description":"Documentfile was dispatched. The Location response header will point to the created and dispatched document. The headers contain Last-Modified and Document-ID."},"204":{"description":"When validation was failed (validation errors can be retrieved using /errors resource)."},"404":{"description":"File not found."}},"description":"Dispatches a documentfile, converting it to UBL and sending it to the inferred receiver.","operationId":"post-rest-external-documentfiles-filename-dispatcher","parameters":[{"name":"filename","in":"query","required":true,"description":"The current filename of the documentfile to dispatch.","schema":{"type":"string"}},{"name":"rename","in":"query","description":"A new filename to rename the file to, as part of the dispatch.","schema":{"type":"string"}},{"name":"documentSource","in":"query","description":"Track the document's source - We save the source of the document in a new table called documentsource so that we know where the document was dispatched from.","schema":{"type":"string"}}],"x-annotation-dx-category":"documents-document_files","summary":"send file","tags":["dx-category--documents-document_files"]}},"/rest/external/documentfiles/{filename}/dispatcher/van/{vanId}":{"parameters":[{"name":"filename","in":"path","required":true,"schema":{"type":"string"},"description":"Original name of the document file to be renamed"},{"name":"vanId","in":"path","required":true,"schema":{"type":"string"},"description":"Identifier of VAN to dispatch documentfile"}],"post":{"responses":{"201":{"description":"Documentfile was dispatched. The Location response header will point to the created and dispatched document. The headers contain Last-Modified and Document-ID."},"204":{"description":"When validation was failed (validation errors can be retrieved using /errors resource)."},"404":{"description":"File not found."}},"description":"Dispatches a documentfile via a given VAN (Value-added-network), converting it to UBL and sending it to the inferred receiver.","operationId":"post-rest-external-documentfiles-filename-dispatcher-van-vanid","parameters":[{"name":"filename","in":"query","required":true,"description":"The current filename of the documentfile to dispatch.","schema":{"type":"string"}},{"name":"rename","in":"query","description":"A new filename to rename the file to, as part of the dispatch.","schema":{"type":"string"}}],"x-annotation-dx-category":"documents-document_files","summary":"send file via VAN","tags":["dx-category--documents-document_files"]}},"/rest/external/documentfiles/{filename}/errors":{"parameters":[{"name":"filename","in":"path","required":true,"schema":{"type":"string"},"description":"Original name of the document file to be renamed"}],"get":{"responses":{"200":{"description":"Errors were found for the given document."},"404":{"description":"No errors were found."}},"description":"Retrieves any validation errors that occurred when dispatching a document (must have POST to /dispatcher","operationId":"get-rest-external-documentfiles-filename-errors","x-annotation-dx-category":"documents-document_files","summary":"error by filename","tags":["dx-category--documents-document_files"]}},"/rest/external/documentfiles/{filename}/file":{"parameters":[{"name":"filename","in":"path","required":true,"schema":{"type":"string"},"description":"Original name of the document file to be renamed"}],"get":{"responses":{"200":{"description":""}},"description":"Retrieves file from a given directory.","operationId":"get-rest-external-documentfiles-filename-file","parameters":[{"name":"directory","in":"query","required":true,"description":"Directory where filename lives.","schema":{"type":"string"}}],"x-annotation-dx-category":"documents-document_files","summary":"find file","tags":["dx-category--documents-document_files"]},"delete":{"responses":{"204":{"description":"File deleted."},"400":{"description":"Supplied required parameters are blank or are invalid."},"404":{"description":"File to delete not found."}},"description":"Deletes a document file.","operationId":"delete-rest-external-documentfiles-filename-file","parameters":[{"name":"directory","in":"query","required":true,"description":"Directory where filename lives.","schema":{"type":"string"}}],"x-annotation-dx-category":"documents-document_files","summary":"delete file","tags":["dx-category--documents-document_files"]}},"/rest/external/documentfiles/{filename}/move":{"parameters":[{"name":"filename","in":"path","required":true,"schema":{"type":"string"},"description":"Original name of the document file to be renamed"}],"post":{"responses":{"204":{"description":"File moved to new directory."},"400":{"description":"Supplied required parameters are blank or are invalid."},"403":{"description":"Moving files from or to the supplied directories is not allowed."},"404":{"description":"File to be moved was not found."}},"description":"Moves a documentfile to a new folder.","operationId":"post-rest-external-documentfiles-filename-move","parameters":[{"name":"directory","in":"query","required":true,"description":"Directory where file currently lives.","schema":{"type":"string"}},{"name":"newdirectory","in":"query","required":true,"description":"Absolute path the directory to move the documentfile to. If the directory does not exist then the directory is created.","schema":{"type":"string"}},{"name":"replace","in":"query","description":"If true, replaces existing file in new directory.","schema":{"type":"boolean"}}],"x-annotation-dx-category":"documents-document_files","summary":"move file to folder","tags":["dx-category--documents-document_files"]}},"/rest/external/documentfiles/{filename}/rename/{newfilename}/file":{"parameters":[{"name":"filename","in":"path","required":true,"schema":{"type":"string"},"description":"Original name of the document file to be renamed"},{"name":"newfilename","in":"path","required":true,"schema":{"type":"string"},"description":"Desired name of the document file being renamed"}],"post":{"responses":{"204":{"description":"File was renamed."},"304":{"description":"file was not renamed because a file with the same name new name already exists."},"400":{"description":"Supplied required parameters are blank or are invalid."},"404":{"description":"File with the original name was not found or the directory does not exist."}},"description":"Renames the document file within the same directory.","operationId":"post-rest-external-documentfiles-filename-rename-newfilename-file","parameters":[{"name":"directory","in":"query","required":true,"description":"Directory where file lives.","schema":{"type":"string"}}],"x-annotation-dx-category":"documents-document_files","summary":"rename file","tags":["dx-category--documents-document_files"]}},"/rest/external/documents":{"get":{"responses":{"200":{"description":"The list of documents found with the same response mime-type as the one\nspecified in the Accept header. The returned result is ordered ascending or descending\n(defaults to descending) based on the selected \"ordering\" parameter (defaults to LastEdit).\n","content":{"application/json":{"example":{"itemsPerPage":25,"itemCount":14,"indexing":false,"numPages":1,"pageId":0,"Document":[{"DocumentId":"7f8959f0-3372-4a5e-b764-7fb42f1ff494","ID":"5","URI":"https://api.tradeshift.com/rest/external/documents/7f8959f0-3372-4a5e-b764-7fb42f1ff494","DocumentType":{"mimeType":"text/xml","documentProfileId":"nes.p5.order.ubl.2.1.dk","type":"order"},"State":"LOCKED","LastEdit":"2017-03-01T15:07:14.421+01:00","Actor":{"Created":"2017-02-27T11:29:19.564+01:00","FirstName":"","LastName":"","Email":"steve.armstrong@eltec.test.ts.sv"},"ReceiverCompanyName":"simon.owen@simons-catering.test.ts.sv","Tags":{"Tag":[]},"ItemInfos":[{"type":"document.description","value":"1"},{"type":"document.total","value":"1.25"},{"type":"document.currency","value":"DKK"},{"type":"document.issuedate","value":"2017-03-01"}],"LatestDispatch":{"DispatchId":"641a034b-e3fc-4218-9a0b-148ed269db51","ObjectId":"7f8959f0-3372-4a5e-b764-7fb42f1ff494","Created":"2017-03-01T15:16:15.657+01:00","SenderUserId":"0cb783f9-22c6-455f-84f1-83f8b3b5bdf5","DispatchState":"COMPLETED","LastStateChange":"2017-03-01T15:16:15.657+01:00","ReceiverConnectionId":"7593c621-d8e8-4b6f-b296-01310f71ff4e","DispatchChannel":"TRADESHIFT"},"SentReceivedTimestamp":"2017-03-01T15:15:40.478+01:00","ProcessState":"PENDING","ConversationStates":[{"Axis":"PROCESS","State":"PENDING","Timestamp":"2017-03-01T15:15:23.059+01:00"},{"Axis":"OTHERPART","State":"OTHER_PENDING","Timestamp":"2017-03-01T15:16:18.023+01:00"},{"Axis":"DELIVERY","State":"SENT","Timestamp":"2017-03-01T15:16:17.968+01:00"}],"UnifiedState":"DELIVERED","Deleted":false,"Properties":[{"scheme":"emailBody","value":""},{"scheme":"emailSubject","value":""}],"ConversationId":"5afdf6e8-862b-40bc-8bf2-86d6364df85c","SettlementIds":["641a034b-e3fc-4218-9a0b-148ed269db58","641a034b-e3fc-4218-9a0b-148ed269db59"]}]},"schema":{"type":"object","properties":{"itemsPerPage":{"type":"integer"},"itemCount":{"type":"integer"},"indexing":{"type":"boolean"},"numPages":{"type":"integer"},"pageId":{"type":"integer"},"Document":{"type":"array","items":{"type":"object","properties":{"DocumentId":{"pattern":"^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$","description":"String representation of an Universally unique identifier (UUID), version 5. See RFC 4122","type":"string"},"ID":{"type":"string"},"URI":{"type":"string"},"DocumentType":{"type":"object","properties":{"mimeType":{"type":"string"},"documentProfileId":{"type":"string"},"type":{"type":"string"}},"required":["mimeType","documentProfileId","type"]},"State":{"enum":["DELETION_AWAITING_APPROVAL","DELETION_REQUESTED","DELETION_IN_PROGRESS","DELETION_COMPLETE","DELETION_FAILED"],"type":"string"},"LastEdit":{"pattern":"^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}(\\.\\d{3})?(Z|(\\+|\\-)[0-9]{2}:[0-9]{2})","description":"ISO8601 formatted DateTime in UTC timezone, fx 2014-12-09T16:11:53Z with optionally .001 for milliseconds.","type":"string"},"Actor":{"type":"object","properties":{"Created":{"pattern":"^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}(\\.\\d{3})?(Z|(\\+|\\-)[0-9]{2}:[0-9]{2})","description":"ISO8601 formatted DateTime in UTC timezone, fx 2014-12-09T16:11:53Z with optionally .001 for milliseconds.","type":"string"},"Firstname":{"type":"string"},"Lastname":{"type":"string"},"Email":{"type":"string"}},"required":["Created","Firstname","Lastname","Email"]},"ReceiverCompanyName":{"type":"string"},"Tags":{"type":"object","properties":{"Tag":{"type":"array","items":{"type":"string"}}},"required":["Tag"]},"ItemInfos":{"type":"array","items":{"type":"object","properties":{"ItemInfo":{"type":"object","properties":{"type":{"type":"string"},"value":{"type":"string"}},"required":["type","value"]}},"required":["ItemInfo"]}},"LatestDispatch":{"type":"object","properties":{"DispatchId":{"pattern":"^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$","description":"String representation of an Universally unique identifier (UUID), version 5. See RFC 4122","type":"string"},"ObjectId":{"pattern":"^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$","description":"String representation of an Universally unique identifier (UUID), version 5. See RFC 4122","type":"string"},"Created":{"pattern":"^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}(\\.\\d{3})?(Z|(\\+|\\-)[0-9]{2}:[0-9]{2})","description":"ISO8601 formatted DateTime in UTC timezone, fx 2014-12-09T16:11:53Z with optionally .001 for milliseconds.","type":"string"},"SenderUserId":{"pattern":"^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$","description":"String representation of an Universally unique identifier (UUID), version 5. See RFC 4122","type":"string"},"DispatchState":{"enum":["ACCEPTED","PROCESSING","COMPLETED","FAILED_TRANSIENT","FAILED"],"type":"string"},"LastStateChange":{"pattern":"^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}(\\.\\d{3})?(Z|(\\+|\\-)[0-9]{2}:[0-9]{2})","description":"ISO8601 formatted DateTime in UTC timezone, fx 2014-12-09T16:11:53Z with optionally .001 for milliseconds.","type":"string"},"ReceiverConnectionId":{"pattern":"^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$","description":"String representation of an Universally unique identifier (UUID), version 5. See RFC 4122","type":"string"},"DispatchChannel":{"type":"string"}},"required":["DispatchId","ObjectId","Created","SenderUserId","DispatchState","LastStateChange","ReceiverConnectionId","DispatchChannel"]},"SentReceivedTimestamp":{"pattern":"^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}(\\.\\d{3})?(Z|(\\+|\\-)[0-9]{2}:[0-9]{2})","description":"ISO8601 formatted DateTime in UTC timezone, fx 2014-12-09T16:11:53Z with optionally .001 for milliseconds.","type":"string"},"ProcessState":{"type":"string"},"ConversationStates":{"type":"array","items":{"type":"object","properties":{"Axis":{"enum":["PROCESS","DELIVERY","PAYMENT","OTHERPART","REPLACEMENT","FINANCING","GLOBAL"],"type":"string"},"State":{"enum":["PROCESS_ANY","PAID","REJECTED","OVERDUE","ACCEPTED","PENDING","INVOICED","DISPUTED","AWAITING_ASSISTANCE","ASSISTANCE_PROVIDED","CANCELED","ASSISTANCE_CANCELED","PUNCHOUT_SENT","PUNCHOUT_EDIT","DELIVERY_ANY","FAILED","SENT","RECEIVED","PROCESSING","PENDING_CONNECTION","PAYMENT_ANY","PAYMENT_CREATED","PAYMENT_PROCESSING","PAYMENT_PENDING","PAYMENT_COMPLETED","PAYMENT_INCOMPLETE","PAYMENT_REVERSAL_INCOMPLETE","PAYMENT_EXPIRED","PAYMENT_ERROR","OTHER_ANY","OTHER_REJECTED","OTHER_CANCELED","OTHER_PENDING","OTHER_PAID","OTHER_ACCEPTED","OTHER_PAYMENT_COMPLETED","OTHER_INVOICED","OTHER_DISPUTED","OTHER_OVERDUE","REPLACEMENT_ANY","ORIGINAL","REPLACED","CORRECTED","FINANCING_ANY","FINANCING_OFFERED","FINANCING_OFFER_ACCEPTED_BY_SUPPLIER","FINANCING_FUNDED"],"type":"string"},"Timestamp":{"type":"string"}},"required":["Axis","State","Timestamp"]}},"UnifiedState":{"enum":["UNDETERMINED","IN_TRANSIT","PENDING_NOT_A_CONTACT","FAILED_DELIVERY","SENT","DELIVERED","ACCEPTED","OVERDUE","PAID_UNCONFIRMED","PAID_CONFIRMED","REJECTED_BY_SENDER","REJECTED_BY_RECEIVER","DISPUTED_BY_RECEIVER","REPLACED","CORRECTED","AWAITING_ASSISTANCE","ASSISTANCE_PROVIDED","CANCELED","ASSISTANCE_CANCELED","PUNCHOUT_SENT","PUNCHOUT_EDIT"],"type":"string"},"Deleted":{"type":"boolean"},"Properties":{"type":"array","items":{"type":"object","properties":{"scheme":{"type":"string"},"value":{"type":"string"}},"required":["scheme","value"]}},"ConversationId":{"type":"string"},"SettlementIds":{"type":"array","items":{"type":"string"}},"OrderTypeCode":{"type":"string"}},"required":["DocumentId","ID","URI","DocumentType","State","LastEdit","Actor","ReceiverCompanyName","Tags","ItemInfos","LatestDispatch","SentReceivedTimestamp","ProcessState","ConversationStates","UnifiedState","Deleted","Properties","ConversationId","SettlementIds","OrderTypeCode"]}}},"required":["itemsPerPage","itemCount","indexing","numPages","pageId","Document"]}}}},"400":{"description":"Bad request error"},"406":{"description":"The request uses Accept headers that the server is unable to fulfill"}},"description":"Gets a list of documents for the current user in XML or JSON format depending on the request Accept header. If multiple criteria are specified, they act as logical AND, unless specified otherwise. Drafts are not returned by default, unless stag=draft is specified. The return list of documents can be sorted by DueDate, LastEdit, Number, Amount, Date, Type.","operationId":"get-rest-external-documents","parameters":[{"name":"Accept","in":"header","required":true,"description":"Media types which are acceptable for the response. The possible values are text/xml and application/json.","schema":{"enum":["application/xml","application/json"],"type":"string"}},{"name":"tag","in":"query","description":"The tag the document must have. Can be used multiple times, which is interpreted as OR unless you set useAndOperatorForTags to true, then it will be AND.","schema":{"type":"string"}},{"name":"useAndOperatorForTags","in":"query","description":"It sets the tags based search to meet all criteria within the set of provided filters.","schema":{"default":false,"type":"boolean"}},{"name":"withouttag","in":"query","description":"The tag the document must not have. Can be used multiple times, which is interpreted as AND.","schema":{"type":"string"}},{"name":"propertykey","in":"query","description":"Must be specified together with propertyvalue. Each pair of propertykey and propertyvalue will be interpreted as AND by default unless you set useOrOperatorForProperties to true, then it will be OR.","schema":{"type":"array","items":{"type":"string"}}},{"name":"propertyvalue","in":"query","description":"See propertykey.","schema":{"type":"array","items":{"type":"string"}}},{"name":"useOrOperatorForProperties","in":"query","description":"It sets the property based search to meet at least one criteria within the set of provided filters.","schema":{"type":"boolean"}},{"name":"ascending","in":"query","description":"Whether the documents are ordered in ascending or descending order (for last edited date), defaults to descending.","schema":{"default":false,"type":"boolean"}},{"name":"type","in":"query","description":"The type of documents to include. Examples of document types 'invoice', 'creditnote'. Can be used multiple times, which is interpreted as OR.","schema":{"type":"string"}},{"name":"page","in":"query","description":"Result page to return. Each page has 'limit' number of results.","schema":{"default":0,"type":"integer"}},{"name":"limit","in":"query","description":"Maximum number of results to return. This is also the number of results on each skipped page. Capped to 100. If _onlyIndex is set to true, includesourcedocuments and populatePersonInfo to false value is capped to 10000.","schema":{"default":25,"type":"integer"}},{"name":"id","in":"query","description":"The documents to get DocumentInformation for (a Tradeshift UUID value)","schema":{"type":"string"}},{"name":"businessId","in":"query","description":"Limits documents to those with the given business id (invoice/credit note/purchase order number, e.g. 'ABC-123'). Note that business ids are not guaranteed to be unique for received documents, and may potentially be duplicated for different documents, even sent by the same supplier.","schema":{"type":"string"}},{"name":"sentBy","in":"query","description":"Sender company tenant id (a Tradeshift UUID value).","schema":{"type":"string"}},{"name":"sentTo","in":"query","description":"Receiver company tenant ids (a Tradeshift UUID value).","schema":{"type":"string"}},{"name":"stag","in":"query","description":"The system tag the document must have. Can be used multiple times, which is interpreted as OR. Known system include \"inbox\", \"outbox\", \"draft\", \"sales\", \"purchases\", \"deleted\".","schema":{"type":"string"}},{"name":"minissuedate","in":"query","description":"Earliest issue date of documents to match (according to UBL content).","schema":{"type":"string"}},{"name":"maxissuedate","in":"query","description":"Latest issue date of documents to match (according to UBL content).","schema":{"type":"string"}},{"name":"since","in":"query","description":"Limits documents to those which have changed since the given timestamp, formatted as a XSD-timestamp.","schema":{"type":"string"}},{"name":"createdBefore","in":"query","description":"Limits documents to those which were created before the given timestamp, formatted as a XSD-timestamp.","schema":{"type":"string"}},{"name":"createdAfter","in":"query","description":"Limits documents to those which were created after the given timestamp, formatted as a XSD-timestamp.","schema":{"type":"string"}},{"name":"processState","in":"query","description":"The _user_ state the document must have (see /metadata). Can be used multiple times, which is interpreted as OR. Note that this parameter is misnamed as it searches among all user states, not just process state.","schema":{"type":"string"}},{"name":"withoutProcessState","in":"query","description":"The process state the document must not have (see /metadata). Can be used multiple times, which is interpreted as AND. Note that this parameter is misnamed as it searches among all user states, not just process state.","schema":{"type":"string"}},{"name":"branchId","in":"query","description":"Document business ids. Can be used multiple times, which is interpreted as OR.","schema":{"type":"string"}},{"name":"totals","in":"query","description":"Whether to calculate the documents total amount or not.","schema":{"default":false,"type":"boolean"}},{"name":"state","in":"query","description":"Representing the state (e.g. SENT, DELIVERED, ACCEPTED) of the searched documents.\nCan be used multiple times, which is interpreted as OR.\nAccepted values are: UNDETERMINED, IN_TRANSIT, PENDING_NOT_A_CONTACT, FAILED_DELIVERY, SENT, DELIVERED, ACCEPTED, OVERDUE, PAID_UNCONFIRMED, PAID_CONFIRMED, REJECTED_BY_SENDER, REJECTED_BY_RECEIVER, DISPUTED_BY_RECEIVER, CLOSED, REPLACED, CORRECTED, IN_ENRICHMENT, IN_CLEARANCE, COLLECTED, AWAITING_ASSISTANCE, ASSISTANCE_PROVIDED, CANCELED, ASSISTANCE_CANCELED, PUNCHOUT_SENT, PUNCHOUT_EDIT.\n","schema":{"type":"string"}},{"name":"ordering","in":"query","description":"Field that indicates the criteria on which result will be ordered upon returning (e.g. DueDate, Amount, Date).","schema":{"default":"LastEdit","type":"string"}},{"name":"sales","in":"query","description":"This parameter decides whether the transaction type of selected documents should be sale or not.","schema":{"type":"boolean"}},{"name":"query","in":"query","description":"This parameter defines the specific text to be searched within the documents. It can include a single or\nmultiple words or phrases and documents that match the search condition will be returned.\n","schema":{"type":"string"}},{"name":"copyIndicator","in":"query","description":"Whether to search only copies of documents, originals or both.","schema":{"type":"boolean"}},{"name":"onlycopies","in":"query","description":"Whether to search only copies of documents.","schema":{"default":false,"type":"boolean"}},{"name":"onlydrafts","in":"query","description":"Whether to search only drafts.","schema":{"default":false,"type":"boolean"}},{"name":"onlydeleted","in":"query","description":"Whether to search only deleted documents.","schema":{"default":false,"type":"boolean"}},{"name":"includesourcedocuments","in":"query","description":"Whether to include the raw UBL document in the result. The UBL documents are stripped of attachments before they are returned.","schema":{"default":false,"type":"boolean"}},{"name":"waitForIndex","in":"query","description":"Whether to wait for pending documents to be indexed.","schema":{"default":true,"type":"boolean"}},{"name":"_onlyIndex","in":"query","description":"This flag allows document listing using exclusively the data from the index.","schema":{"default":false,"type":"boolean"}},{"name":"conversationId","in":"query","description":"The document conversation id used for getting its related documents.","schema":{"type":"string"}},{"name":"totalFrom","in":"query","description":"It represents the minimum value of the total range that can be used to filter documents.","schema":{"type":"number"}},{"name":"totalTo","in":"query","description":"It represents the maximum value of the total range that can be used to filter documents.","schema":{"type":"number"}},{"name":"currency","in":"query","description":"It represents the currency that can be used to filter documents only of that currency.","schema":{"type":"string"}},{"name":"requesterId","in":"query","description":"This field can be used to filter documents by the given list of requester Ids, only applicable for Purchase Request Documents. The requester is either the creating person or the document or if specified the \"on behalf of\" person\n","schema":{"type":"string"}},{"name":"invoiceTypeCode","in":"query","description":"This field represents the type of invoice for an invoice document. If the field is missing then we will have a normal/commercial invoice filter. For value 325 proforma invoice type will be searched and for value 386 we will have prepayment invoice.\n","schema":{"type":"array","items":{"type":"number"}}},{"name":"accountingSystemId","in":"query","description":"This field represents a custom value assigned by a client to a connection with a supplier.\n","schema":{"type":"string"}},{"name":"accountingCost","in":"query","description":"This field represents a custom value assigned by a client refering to a Cost Center.","schema":{"type":"string"}},{"name":"profileId","in":"query","description":"It represents the profile id of a given document.","schema":{"type":"string"}},{"name":"populatePersonInfo","in":"query","description":"Populate person info (actor and requester)","schema":{"default":true,"type":"boolean"}},{"name":"orderTypeCode","in":"query","description":"This field represents the type of order for an order document.","schema":{"type":"array","items":{"type":"number"}}},{"name":"orderChangeTypeCode","in":"query","description":"This field represents the type of order for an order change document.","schema":{"type":"array","items":{"type":"number"}}},{"name":"invoicingStatus","in":"query","description":"The invoicing status the document must have (order documents only). Can be used multiple times, which is interpreted as OR.\n","schema":{"type":"array","items":{"type":"string"}}}],"x-annotation-dx-category":"documents-document","summary":"find documents","tags":["dx-category--documents-document"]}},"/rest/external/documents/assignments/companies/{companyid}/autoassignments":{"parameters":[{"name":"companyid","in":"path","required":true,"schema":{"type":"string"},"description":"UUID identifier of the company account."}],"get":{"responses":{"200":{"description":"Paginated company auto assignments list.","content":{"application/json":{"example":{"numPages":10,"pageId":0,"itemsPerPage":40,"itemCount":200,"Items":[{"AutoAssignmentInfo":{"ExcludeUser":false,"Assignee":"21e6e782-f760-43d6-aa1c-d614ce966d8c","AutoAssignee":"cb11332d-1ec4-4ecf-95fe-ce94cca20a34","GroupId":"4f4a7eb9-7978-4860-a293-a254d15f3e29","Created":1565335439328,"DelegationType":"DELEGATING","CreatedBy":"21e6e782-f760-43d6-aa1c-d614ce966d8c","IsDelegation":true}}]},"schema":{"title":"Tradeshift Public API 1.0 - AutoAssignmentsCompleteInfoPagedList","required":["numPages","pageId","itemsPerPage","itemCount"],"type":"object","additionalProperties":false,"properties":{"numPages":{"type":"integer"},"pageId":{"type":"integer"},"itemsPerPage":{"type":"integer"},"itemCount":{"type":"integer"},"Items":{"type":"array","items":{"type":"object","properties":{"ExcludeUser":{"type":"boolean"},"Assignee":{"pattern":"^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$","description":"String representation of an Universally unique identifier (UUID), version 5. See RFC 4122","type":"string"},"AutoAssignee":{"pattern":"^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$","description":"String representation of an Universally unique identifier (UUID), version 5. See RFC 4122","type":"string"},"GroupId":{"pattern":"^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$","description":"String representation of an Universally unique identifier (UUID), version 5. See RFC 4122","type":"string"},"Created":{"type":"number"},"DelegationType":{"type":"string"},"CreatedBy":{"pattern":"^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$","description":"String representation of an Universally unique identifier (UUID), version 5. See RFC 4122","type":"string"},"IsDelegation":{"type":"boolean"}},"required":["ExcludeUser","Assignee","AutoAssignee","GroupId","Created","DelegationType","CreatedBy","IsDelegation"]}}}}}}}},"description":"Get paginated company auto assignments.","operationId":"get-rest-external-documents-assignments-companies-companyid-autoassignments","parameters":[{"name":"page","in":"query","description":"The current page of the result set to be fetched","schema":{"default":0,"type":"integer"}},{"name":"limit","in":"query","description":"The limit of the result set to return, also page size","schema":{"default":10,"type":"integer"}}],"x-annotation-dx-category":"documents-assignments","summary":"get company auto assignments","tags":["dx-category--documents-assignments"]}},"/rest/external/documents/assignments/companies/{companyid}/sparse":{"parameters":[{"name":"companyid","in":"path","required":true,"schema":{"type":"string"},"description":"UUID identifier of the company account."}],"get":{"responses":{"200":{"description":"Paginated company assignments list.","content":{"application/json":{"example":{"itemsPerPage":2,"itemCount":2,"numPages":1,"pageId":0,"Assignments":[{"DocumentId":"ac304edf-7fa7-49c3-8f1c-e82c037cf743","DocumentType":{"mimeType":"text/xml","documentProfileId":"tradeshift.assignment.1.0","type":"assignment"},"Tags":{"Tag":[]},"ItemInfos":[],"ConversationStates":[],"CopyIndicator":false,"Deleted":false,"SourceDocument":{"DocumentType":"AssignmentType","IssueDate":{"value":"2019-04-02T08:38:25.139Z"},"IssueTime":{"value":"2019-04-02T08:38:25.139Z"},"Assignee":[{"PartyIdentification":[{"ID":{"value":"a482b987-7c39-40e2-a526-03549d5fe668"}}],"Contact":{"ElectronicMail":{"value":"george.owen@simons-catering.test.ts.sv"}},"Person":[{"FirstName":{"value":"Simon"},"FamilyName":{"value":"Owen"}}]}],"Delegation":[],"Subject":{"UUID":{"value":"867dd235-4b16-5212-b1aa-292bce33765e"}},"Type":"APPROVAL","OriginalDocumentId":{"value":"867dd235-4b16-5212-b1aa-292bce33765e"}},"Properties":[]}]},"schema":{"title":"Tradeshift Public API 1.0 - AssignmentsPagedList","required":["itemsPerPage","itemCount","numPages","pageId","Assignments"],"type":"object","additionalProperties":false,"properties":{"itemsPerPage":{"type":"integer"},"itemCount":{"type":"integer"},"numPages":{"type":"integer"},"pageId":{"type":"integer"},"Assignments":{"type":"array","items":{"required":["DocumentType","Tags","ItemInfos","ConversationStates","CopyIndicator","Deleted","SourceDocument","Properties"],"type":"object","properties":{"DocumentType":{"required":["mimeType","documentProfileId","type"],"type":"object","properties":{"type":{"type":"string"},"mimeType":{"type":"string"},"documentProfileId":{"type":"string"}}},"Tags":{"required":["Tag"],"type":"object","properties":{"Tag":{"type":"array","items":{"type":"string"}}}},"ItemInfos":{"type":"array","items":{"type":"string"}},"ConversationStates":{"type":"array","items":{"type":"string"}},"CopyIndicator":{"type":"boolean"},"Deleted":{"type":"boolean"},"SourceDocument":{"required":["DocumentType","IssueTime","Assignee","Delegation","Subject","Type","OriginalDocumentId"],"type":"object","properties":{"DocumentType":{"type":"string"},"IssueTime":{"required":["value"],"type":"object","properties":{"value":{"type":"string"}}},"Assignee":{"type":"array","items":{"required":["PartyIdentification","Contact","Person"],"type":"object","properties":{"PartyIdentification":{"type":"array","items":{"required":["ID"],"type":"object","properties":{"ID":{"required":["value"],"type":"object","properties":{"value":{"type":"string"},"schemeURI":{"type":"string"}}}}}},"Contact":{"required":["ElectronicMail"],"type":"object","properties":{"ElectronicMail":{"required":["value"],"type":"object","properties":{"value":{"type":"string"}}}}},"Person":{"type":"array","items":{"type":"string"}}}}},"Delegation":{"type":"array","items":{"type":"string"}},"Subject":{"required":["UUID"],"type":"object","properties":{"UUID":{"required":["value"],"type":"object","properties":{"value":{"type":"string"}}}}},"Type":{"type":"string"},"OriginalDocumentId":{"required":["value"],"type":"object","properties":{"value":{"type":"string"}}}}},"Properties":{"type":"array","items":{"type":"string"}}}}}}}}}}},"description":"Get paginated company assignments, using lightweight sparse composition of response data.","operationId":"get-rest-external-documents-assignments-companies-companyid-sparse","parameters":[{"name":"page","in":"query","description":"The current page of the result set to be fetched","schema":{"default":0,"type":"integer"}},{"name":"limit","in":"query","description":"The limit of the result set to return, also page size","schema":{"default":10,"type":"integer"}}],"x-annotation-dx-category":"documents-assignments","summary":"get company assignments sparse","tags":["dx-category--documents-assignments"]}},"/rest/external/documents/assignments/groups/{groupId}/users/{userId}/autoassign":{"parameters":[{"name":"groupId","in":"path","required":true,"schema":{"type":"string"},"description":"UUID identifier of auto assignment security group."},{"name":"userId","in":"path","required":true,"schema":{"type":"string"},"description":"UUID identifier of the assignee user."}],"get":{"responses":{"200":{"description":"An autoassignment has been found, auto-assignee user details are returned","content":{"application/json":{"example":{"Id":"72585039-d82d-4f76-8531-bf52717d5957","CompanyAccountId":"8a4cdb4a-9ec5-4107-a55b-dedf3aa7b000","CompanyName":"ELTEC Inc. ddmrafryuyaw","Username":"steve.armstrong@ddmrafryuyaw.eltec.test.ts.sv","Language":"en-us","TimeZone":"America/Los_Angeles","Memberships":[{"UserId":"72585039-d82d-4f76-8531-bf52717d5957","GroupId":"8a4cdb4a-9ec5-4107-a55b-dedf3aa7b000","Role":"a6a3edcd-00d9-427c-bf03-4ef0112ba16d"}],"Created":"2019-10-31T12:08:59.303Z","State":"ACTIVE","Type":"PERSON","FirstName":"Steve","LastName":"Armstrong","Visible":true},"schema":{"required":["Id","CompanyAccountId","CompanyName","Username","Language","Created","FirstName","LastName"],"type":"object","properties":{"Id":{"type":"string"},"CompanyAccountId":{"type":"string"},"CompanyName":{"type":"string"},"Username":{"type":"string"},"Language":{"type":"string"},"TimeZone":{"type":"string"},"Created":{"type":"string"},"Memberships":{"type":"array","items":{"required":["UserId","GroupId","Role"],"type":"object","properties":{"UserId":{"type":"string"},"GroupId":{"type":"string"},"Role":{"type":"string"}}}},"State":{"type":"string"},"Type":{"type":"string"},"FirstName":{"type":"string"},"LastName":{"type":"string"},"Title":{"type":"string"},"Visible":{"type":"boolean"}}}}}},"401":{"description":"Requesting user is not a member of the specified security group"}},"description":"Endpoint used to fetch the auto-assignee for a specific user and a specific group id. The requesting user has to be a member of the inquired security group id.\n","operationId":"get-rest-external-documents-assignments-groups-groupid-users-userid-autoassign","x-annotation-dx-category":"documents-assignments","summary":"get user auto-assignment in specific group","tags":["dx-category--documents-assignments"]}},"/rest/external/documents/assignments/users/{userId}/autoassign":{"parameters":[{"name":"userId","in":"path","required":true,"schema":{"type":"string"},"description":"UUID identifier of user account."}],"get":{"responses":{"200":{"description":"Returns the assignment document","content":{"application/json":{"example":{"DocumentType":"AssignmentType","UBLVersionID":{"value":"2.0"},"CustomizationID":{"value":"urn:tradeshift.com:ubl-2.0-customizations:2010-06"},"ID":{"value":"18744cac-cab0-4508-950b-bb4983dbcfa6"},"IssueDate":{"value":"2016-11-29+01:00"},"IssueTime":{"value":"11:21:21.011+01:00"},"Assigner":{"PartyIdentification":[{"ID":{"value":"e6e0b52f-ce77-4e0c-b7a1-d3c63f2857fb","schemeURI":"http://tradeshift.com/api/1.0/userId"}}],"Contact":{"ElectronicMail":{"value":"lma+buyer@tradeshift.com"}},"Person":{"FirstName":{"value":"Marie"},"FamilyName":{"value":"Carter"}}},"Assignee":[{"PartyIdentification":[{"ID":{"value":"2dc74f5e-4ac7-45bf-8b6b-67dcf9ae2920","schemeURI":"http://tradeshift.com/api/1.0/userId"}}],"Contact":{"ElectronicMail":{"value":"lma+hhr@tradeshift.com"}},"Person":{"FirstName":{"value":"Pete"},"FamilyName":{"value":"Johnson"},"JobTitle":{"value":"Head of HR"}}}],"Delegation":[],"Subject":{"UUID":{"value":"2849ac7c-36c9-4b20-8ca1-dc29a4a6e2b8"},"DocumentType":{"value":"USER"}},"Context":{"EmbeddedDocumentBinaryObject":{"value":"ewogICJjb21tZW50IiA6IG51bGwsCiAgInVzZXIiIDogewogICAgIk1lbWJlcnNoaXBzIiA6IFsgewogICAgICAiUm9sZSIgOiAiZmU4ODhmYmItMTcyZi00NjdjLWI5YWQtZWZlMDcyMGZlY2Y5IiwKICAgICAgIlVzZXJJZCIgOiAiMjg0OWFjN2MtMzZjOS00YjIwLThjYTEtZGMyOWE0YTZlMmI4IiwKICAgICAgIkdyb3VwSWQiIDogImJlNjg2NWVlLWRhYmQtNDcxNi05YzlkLTg5YjZkZDk1NTMyYiIKICAgIH0gXSwKICAgICJDb21wYW55QWNjb3VudElkIiA6ICJiZTY4NjVlZS1kYWJkLTQ3MTYtOWM5ZC04OWI2ZGQ5NTUzMmIiLAogICAgIkZpcnN0TmFtZSIgOiAiTHlubiIsCiAgICAiVGl0bGUiIDogIkhSIE1hbmFnZXIgKE9uIEJlaGFsZiBvZikiLAogICAgIkNyZWF0ZWQiIDogIjIwMTYtMTAtMTlUMTU6NTU6MTYuMDQ3KzAyOjAwIiwKICAgICJDb21wYW55TmFtZSIgOiAiQnV5ZXIgbG1hK2J1eWVyQHRyYWRlc2hpZnQuY29tIiwKICAgICJUaW1lWm9uZSIgOiAiRXVyb3BlL0NvcGVuaGFnZW4iLAogICAgIlR5cGUiIDogIlBFUlNPTiIsCiAgICAiTGFuZ3VhZ2UiIDogImVuLXVzIiwKICAgICJVc2VybmFtZSIgOiAibG1hK29ib0B0cmFkZXNoaWZ0LmNvbSIsCiAgICAiU3RhdGUiIDogIkxPQ0tFRCIsCiAgICAiVmlzaWJsZSIgOiB0cnVlLAogICAgIklkIiA6ICIyODQ5YWM3Yy0zNmM5LTRiMjAtOGNhMS1kYzI5YTRhNmUyYjgiLAogICAgIkxhc3ROYW1lIiA6ICJLZW5uZWR5IgogIH0KfQ==","format":"app:Tradeshift.UserManagement.AssignmentEntryService","mimeCode":"text/plain"}},"ReminderDate":{"value":"2016-12-01+01:00"},"ReminderTime":{"value":"11:21:21.014+01:00"},"EscalationDate":{"value":"2016-12-06+01:00"},"EscalationTime":{"value":"11:21:21.014+01:00"},"VendorId":"tradeshift","Type":"REASSIGN"},"schema":{"required":["DocumentType","UBLVersionID","CustomizationID","ID","IssueDate","IssueTime","Assigner","Assignee","Delegation","Subject","Context","ReminderDate","ReminderTime","EscalationDate","EscalationTime","VendorId","Type"],"type":"object","properties":{"DocumentType":{"type":"string"},"UBLVersionID":{"required":["value"],"type":"object","properties":{"value":{"type":"string"}}},"CustomizationID":{"required":["value"],"type":"object","properties":{"value":{"type":"string"}}},"ID":{"required":["value"],"type":"object","properties":{"value":{"type":"string"}}},"IssueDate":{"required":["value"],"type":"object","properties":{"value":{"type":"string"}}},"IssueTime":{"required":["value"],"type":"object","properties":{"value":{"type":"string"}}},"Assigner":{"required":["PartyIdentification","Contact","Person"],"type":"object","properties":{"PartyIdentification":{"type":"array","items":{"required":["ID"],"type":"object","properties":{"ID":{"required":["value","schemeURI"],"type":"object","properties":{"value":{"type":"string"},"schemeURI":{"type":"string"}}}}}},"Contact":{"required":["ElectronicMail"],"type":"object","properties":{"ElectronicMail":{"required":["value"],"type":"object","properties":{"value":{"type":"string"}}}}},"Person":{"required":["FirstName","FamilyName"],"type":"object","properties":{"FirstName":{"required":["value"],"type":"object","properties":{"value":{"type":"string"}}},"FamilyName":{"required":["value"],"type":"object","properties":{"value":{"type":"string"}}}}}}},"Assignee":{"type":"array","items":{"required":["PartyIdentification","Contact","Person"],"type":"object","properties":{"PartyIdentification":{"type":"array","items":{"required":["ID"],"type":"object","properties":{"ID":{"required":["value","schemeURI"],"type":"object","properties":{"value":{"type":"string"},"schemeURI":{"type":"string"}}}}}},"Contact":{"required":["ElectronicMail"],"type":"object","properties":{"ElectronicMail":{"required":["value"],"type":"object","properties":{"value":{"type":"string"}}}}},"Person":{"required":["FirstName","FamilyName","JobTitle"],"type":"object","properties":{"FirstName":{"required":["value"],"type":"object","properties":{"value":{"type":"string"}}},"FamilyName":{"required":["value"],"type":"object","properties":{"value":{"type":"string"}}},"JobTitle":{"required":["value"],"type":"object","properties":{"value":{"type":"string"}}}}}}}},"Delegation":{"type":"array","items":{"type":"string"}},"Subject":{"required":["UUID","DocumentType"],"type":"object","properties":{"UUID":{"required":["value"],"type":"object","properties":{"value":{"type":"string"}}},"DocumentType":{"required":["value"],"type":"object","properties":{"value":{"type":"string"}}}}},"Context":{"required":["EmbeddedDocumentBinaryObject"],"type":"object","properties":{"EmbeddedDocumentBinaryObject":{"required":["value","format","mimeCode"],"type":"object","properties":{"value":{"type":"string"},"format":{"type":"string"},"mimeCode":{"type":"string"}}}}},"ReminderDate":{"required":["value"],"type":"object","properties":{"value":{"type":"string"}}},"ReminderTime":{"required":["value"],"type":"object","properties":{"value":{"type":"string"}}},"EscalationDate":{"required":["value"],"type":"object","properties":{"value":{"type":"string"}}},"EscalationTime":{"required":["value"],"type":"object","properties":{"value":{"type":"string"}}},"VendorId":{"type":"string"},"Type":{"type":"string"}}}}}},"400":{"description":"Bad request error."}},"description":"Returns the assignment document.","operationId":"get-rest-external-documents-assignments-users-userid-autoassign","parameters":[{"name":"subjectType","in":"query","description":"The subject of the Assignment [DOCUMENT, USER, COMPANY, CONNECTION, NETWORK_REQUEST]","schema":{"default":"DOCUMENT","type":"string"}}],"x-annotation-dx-category":"documents-assignments","summary":"get user assignments","tags":["dx-category--documents-assignments"]}},"/rest/external/documents/assignments/users/{userId}/autoassign/detail":{"parameters":[{"name":"userId","in":"path","required":true,"schema":{"type":"string"},"description":"User UUID identifier"}],"get":{"responses":{"200":{"description":"","content":{"text/xml":{"example":"<AutoAssignmentDetail xmlns=\"http://tradeshift.com/api/public/1.0\">\n    <User>\n        <Id>0daab548-3990-41ed-b0f4-eb197e693df1</Id>\n        <CompanyAccountId>093aafb9-2620-4655-885e-888f2a65c59c</CompanyAccountId>\n        <CompanyName>Tradeshift</CompanyName>\n        <Username>steve.armstrong@example.org</Username>\n        <Language>en-us</Language>\n        <TimeZone>GMT</TimeZone>\n        <Memberships>\n            <Membership>\n                <UserId>0daab548-3990-41ed-b0f4-eb197e693df1</UserId>\n                <GroupId>093aafb9-2620-4655-885e-888f2a65c59c</GroupId>\n                <Role>a6a3edcd-00d9-427c-bf03-4ef0112ba16d</Role>\n            </Membership>\n        </Memberships>\n        <Created>2016-06-07T14:29:05.601+02:00</Created>\n        <State>ACTIVE</State>\n        <Type>PERSON</Type>\n        <FirstName>Steve</FirstName>\n        <LastName>Armstrong</LastName>\n        <Title>boss</Title>\n        <Visible>true</Visible>\n    </User>\n    <AutoAssignee>\n        <ExcludeUser>false</ExcludeUser>\n        <UserID>0daab548-3990-41ed-b0f4-eb197e693df1</UserID>\n        <Created/>\n        <IsDelegation>true</IsDelegation>\n        <DelegationType>DELEGATING</DelegationType>\n    </AutoAssignee>\n</AutoAssignmentDetail>\n","schema":{"type":"object"}}}}},"description":"Returns the auto assignment details of an user.","operationId":"get-rest-external-documents-assignments-users-userid-autoassign-detail","x-annotation-dx-category":"documents-assignments","summary":"get user assignments detail","tags":["dx-category--documents-assignments"]}},"/rest/external/documents/assignments/users/{userId}/autoassign/{autoAssigneeId}":{"parameters":[{"name":"userId","in":"path","required":true,"schema":{"type":"string"},"description":"The assignee id"},{"name":"autoAssigneeId","in":"path","required":true,"schema":{"type":"string"},"description":"The autoassignee id"}],"delete":{"responses":{"200":{"description":"The requested auto assignment has been deleted"},"304":{"description":"Couldn't find the requested assignment for deletion"}},"description":"Delete one assignment as identified by the path parameters and the requester's group id","operationId":"delete-rest-external-documents-assignments-users-userid-autoassign-autoassigneeid","parameters":[{"name":"groupId","in":"query","description":"Group id associated to this autoassignment. If this is missing, the X-Tradeshift-TenantId header value is used","schema":{"type":"string"}}],"x-annotation-dx-category":"documents-assignments","summary":"delete auto assignment","tags":["dx-category--documents-assignments"]}},"/rest/external/documents/assignments/users/{userId}/autoassign/{autoAssigneeId}/delegationType/{delegationType}":{"parameters":[{"name":"userId","in":"path","required":true,"schema":{"type":"string"},"description":"User UUID identifier for the assigner"},{"name":"autoAssigneeId","in":"path","required":true,"schema":{"type":"string"},"description":"User UUID identifier for the assignee"},{"name":"delegationType","in":"path","required":true,"schema":{"type":"string"},"description":"Type of delegation to be applied"}],"put":{"responses":{"204":{"description":"Autoassignment created."},"401":{"description":"The requesting user is not a member of the specified security group"}},"description":"Create an autoassignment from userId to autoAssigneeId","operationId":"put-rest-external-documents-assignments-users-userid-autoassign-autoassigneeid-delegationtype-delegationtype","parameters":[{"name":"excludeUser","in":"query","description":"Whether to exclude the user","schema":{"default":false,"type":"boolean"}},{"name":"groupId","in":"query","description":"Group id associated to this autoassignment. If this is missing, the X-Tradeshift-TenantId header value is used","schema":{"type":"string"}}],"x-annotation-dx-category":"documents-assignments","summary":"create autoassignment","tags":["dx-category--documents-assignments"]}},"/rest/external/documents/assignments/users/{userId}/autoassigners/detail":{"parameters":[{"name":"userId","in":"path","required":true,"schema":{"type":"string"},"description":"User UUID identifier"}],"get":{"responses":{"200":{"description":"","content":{"application/json":{"example":{"AutoAssigners":[{"User":{"Id":"0daab548-3990-41ed-b0f4-eb197e693df1","CompanyAccountId":"093aafb9-2620-4655-885e-888f2a65c59c","CompanyName":"Tradeshift","Username":"steve.armstrong@example.org","Language":"en","TimeZone":"GMT","Memberships":[{"UserId":"0daab548-3990-41ed-b0f4-eb197e693df1","GroupId":"093aafb9-2620-4655-885e-888f2a65c59c","Role":"a6a3edcd-00d9-427c-bf03-4ef0112ba16d"}],"Created":"2016-06-07T14:29:05.601+02:00","State":"ACTIVE","Type":"PERSON","FirstName":"Steve","LastName":"Armstrong","Title":"boss","Visible":true},"AutoAssignee":{"ExcludeUser":false,"UserID":"0daab548-3990-41ed-b0f4-eb197e693df1","Created":1472655207107,"IsDelegation":true,"DelegationType":"DELEGATING"}}]},"schema":{"required":["AutoAssigners"],"type":"object","properties":{"AutoAssigners":{"type":"array","items":{"required":["User","AutoAssignee"],"type":"object","properties":{"User":{"required":["Id","CompanyAccountId","CompanyName","Username","Language","TimeZone","Memberships","Created","State","Type","FirstName","LastName","Title","Visible"],"type":"object","properties":{"Id":{"type":"string"},"CompanyAccountId":{"type":"string"},"CompanyName":{"type":"string"},"Username":{"type":"string"},"Language":{"type":"string"},"TimeZone":{"type":"string"},"Created":{"type":"string"},"Memberships":{"type":"array","items":{"required":["UserId","GroupId","Role"],"type":"object","properties":{"UserId":{"type":"string"},"GroupId":{"type":"string"},"Role":{"type":"string"}}}},"State":{"type":"string"},"Type":{"type":"string"},"FirstName":{"type":"string"},"LastName":{"type":"string"},"Title":{"type":"string"},"Visible":{"type":"boolean"}}},"AutoAssignee":{"required":["ExcludeUser","UserID","Created","IsDelegation","DelegationType"],"type":"object","properties":{"ExcludeUser":{"type":"boolean"},"UserID":{"type":"string"},"Created":{"type":"integer"},"IsDelegation":{"type":"boolean"},"DelegationType":{"type":"string"}}}}}}}}}}}},"description":"Returns the all assigners that activated auto assign or delegate to current user","operationId":"get-rest-external-documents-assignments-users-userid-autoassigners-detail","x-annotation-dx-category":"documents-assignments","summary":"find assigners by user","tags":["dx-category--documents-assignments"]}},"/rest/external/documents/assignments/users/{userid}/sparse":{"parameters":[{"name":"userid","in":"path","required":true,"schema":{"type":"string"},"description":"UUID identifier of user account."}],"get":{"responses":{"200":{"description":"Paginated user assignments list.","content":{"application/json":{"example":{"itemsPerPage":2,"itemCount":2,"numPages":1,"pageId":0,"Assignments":[{"DocumentId":"ac304edf-7fa7-49c3-8f1c-e82c037cf743","DocumentType":{"mimeType":"text/xml","documentProfileId":"tradeshift.assignment.1.0","type":"assignment"},"Tags":{"Tag":[]},"ItemInfos":[],"ConversationStates":[],"CopyIndicator":false,"Deleted":false,"SourceDocument":{"DocumentType":"AssignmentType","IssueDate":{"value":"2019-04-02T08:38:25.139Z"},"IssueTime":{"value":"2019-04-02T08:38:25.139Z"},"Assignee":[{"PartyIdentification":[{"ID":{"value":"a482b987-7c39-40e2-a526-03549d5fe668"}}],"Contact":{"ElectronicMail":{"value":"george.owen@simons-catering.test.ts.sv"}},"Person":[{"FirstName":{"value":"Simon"},"FamilyName":{"value":"Owen"}}]}],"Delegation":[],"Subject":{"UUID":{"value":"867dd235-4b16-5212-b1aa-292bce33765e"}},"Type":"APPROVAL","OriginalDocumentId":{"value":"867dd235-4b16-5212-b1aa-292bce33765e"}},"Properties":[]}]},"schema":{"title":"Tradeshift Public API 1.0 - AssignmentsPagedList","required":["itemsPerPage","itemCount","numPages","pageId","Assignments"],"type":"object","additionalProperties":false,"properties":{"itemsPerPage":{"type":"integer"},"itemCount":{"type":"integer"},"numPages":{"type":"integer"},"pageId":{"type":"integer"},"Assignments":{"type":"array","items":{"required":["DocumentType","Tags","ItemInfos","ConversationStates","CopyIndicator","Deleted","SourceDocument","Properties"],"type":"object","properties":{"DocumentType":{"required":["mimeType","documentProfileId","type"],"type":"object","properties":{"type":{"type":"string"},"mimeType":{"type":"string"},"documentProfileId":{"type":"string"}}},"Tags":{"required":["Tag"],"type":"object","properties":{"Tag":{"type":"array","items":{"type":"string"}}}},"ItemInfos":{"type":"array","items":{"type":"string"}},"ConversationStates":{"type":"array","items":{"type":"string"}},"CopyIndicator":{"type":"boolean"},"Deleted":{"type":"boolean"},"SourceDocument":{"required":["DocumentType","IssueTime","Assignee","Delegation","Subject","Type","OriginalDocumentId"],"type":"object","properties":{"DocumentType":{"type":"string"},"IssueTime":{"required":["value"],"type":"object","properties":{"value":{"type":"string"}}},"Assignee":{"type":"array","items":{"required":["PartyIdentification","Contact","Person"],"type":"object","properties":{"PartyIdentification":{"type":"array","items":{"required":["ID"],"type":"object","properties":{"ID":{"required":["value"],"type":"object","properties":{"value":{"type":"string"},"schemeURI":{"type":"string"}}}}}},"Contact":{"required":["ElectronicMail"],"type":"object","properties":{"ElectronicMail":{"required":["value"],"type":"object","properties":{"value":{"type":"string"}}}}},"Person":{"type":"array","items":{"type":"string"}}}}},"Delegation":{"type":"array","items":{"type":"string"}},"Subject":{"required":["UUID"],"type":"object","properties":{"UUID":{"required":["value"],"type":"object","properties":{"value":{"type":"string"}}}}},"Type":{"type":"string"},"OriginalDocumentId":{"required":["value"],"type":"object","properties":{"value":{"type":"string"}}}}},"Properties":{"type":"array","items":{"type":"string"}}}}}}}}}}},"description":"Get paginated user assignments, using lightweight sparse composition of response data","operationId":"get-rest-external-documents-assignments-users-userid-sparse","parameters":[{"name":"page","in":"query","description":"The current page of the result set to be fetched","schema":{"default":0,"type":"integer"}},{"name":"limit","in":"query","description":"The limit of the result set to return, also page size","schema":{"default":10,"type":"integer"}},{"name":"type","in":"query","description":"Type of the assignment to include in the result set","schema":{"type":"string"}}],"x-annotation-dx-category":"documents-assignments","summary":"get user assignments sparse","tags":["dx-category--documents-assignments"]}},"/rest/external/documents/companies/{owningCompanyId}/{documentId}":{"parameters":[{"name":"owningCompanyId","in":"path","required":true,"schema":{"type":"string"},"description":"UUID identifier of company account owning the document."},{"name":"documentId","in":"path","required":true,"schema":{"type":"string"},"description":"Document UUID identifier"}],"get":{"responses":{"307":{"description":"Successful response\n","headers":{"Location":{"schema":{"type":"string"}}}},"404":{"description":"Document not found or the security check do not pass\n"}},"description":"Retrieves a document in the context of an owning company. If the supplied authentication context has access to\nsee document identified by {documentId}, meaning the sender of the document, then returns a redirect to GET the document with {documentId}.\nIf the supplied authentication context does not have access to the document, then checks to see if it has\naccess to a document that references the supplied {documentId}, and returns a redirect to GET that referencing document instead.\nThis endpoint is used for example when the receiver of a document does not know the id of the document from\nhis side, but instead knows the company who sent it and the document id from that company context. The response\nwill be a redirect to GET a content of the document accessible by the receiver.\nThis only works if a sender tries to access one of its documents, or a receiver tries to find a content based\non a sender side reference id. It does not work for if a sender tries to access a document content based on the\nreference to a receiver side, because this information is stored only on the receiver side copy of the document.\n","operationId":"get-rest-external-documents-companies-owningcompanyid-documentid","parameters":[{"name":"Accept","in":"header","required":true,"description":"The MIME media type of the response content. Example: text/xml, application/json, application/*\n","schema":{"default":"text/xml","type":"string"}}],"x-annotation-dx-category":"documents-document","summary":"Get company document","tags":["dx-category--documents-document"]}},"/rest/external/documents/csv":{"get":{"responses":{"200":{"description":"The list of documents as text/csv."},"400":{"description":"Bad request error"},"406":{"description":"The request uses Accept headers that the server is unable to fulfill"}},"description":"Gets a list of documents in CSV format for the current user. If multiple criteria are specified, they act as logical AND, unless specified otherwise. Drafts are not returned by default, unless stag=draft is specified. Could be sorted by DueDate, LastEdit, Number, Amount, Date, Type. The returned mime-type is always text/csv regardless if Accept header is application/csv or text/csv.","operationId":"get-rest-external-documents-csv","parameters":[{"name":"Accept","in":"header","required":true,"description":"Media types which are acceptable for the response. The possible values are application/csv and text/csv.","schema":{"enum":["text/csv","application/csv"],"type":"string"}},{"name":"tag","in":"query","description":"The tag the document must have. Can be used multiple times, which is interpreted as OR unless you set useAndOperatorForTags to true, then it will be AND.","schema":{"type":"string"}},{"name":"useAndOperatorForTags","in":"query","description":"It sets the tags based search to meet all criteria within the set of provided filters.","schema":{"default":false,"type":"boolean"}},{"name":"withouttag","in":"query","description":"The tag the document must not have. Can be used multiple times, which is interpreted as AND.","schema":{"type":"string"}},{"name":"propertykey","in":"query","description":"Must be specified together with propertyvalue. Each pair of propertykey and propertyvalue will be interpreted as AND.","schema":{"type":"string"}},{"name":"propertyvalue","in":"query","description":"See propertykey.","schema":{"type":"string"}},{"name":"ascending","in":"query","description":"Whether the documents are ordered in ascending or descending order (for last edited date), defaults to descending.","schema":{"default":false,"type":"boolean"}},{"name":"type","in":"query","description":"The type of documents to include. Can be used multiple times, which is interpreted as OR.","schema":{"type":"string"}},{"name":"limit","in":"query","description":"Maximum number of results to return. This is also the number of results on each skipped page.","schema":{"default":25,"type":"integer"}},{"name":"stag","in":"query","description":"The system tag the document must have. Can be used multiple times, which is interpreted as OR. Known system include \"inbox\", \"outbox\", \"draft\", \"sales\", \"purchases\", \"deleted\".","schema":{"type":"string"}},{"name":"minissuedate","in":"query","description":"Earliest issue date of documents to match (according to UBL content).","schema":{"type":"string"}},{"name":"maxissuedate","in":"query","description":"Latest issue date of documents to match (according to UBL content).","schema":{"type":"string"}},{"name":"createdBefore","in":"query","description":"Limits documents to those which were created before the given timestamp, formatted as a XSD-timestamp.","schema":{"type":"string"}},{"name":"createdAfter","in":"query","description":"Limits documents to those which were created after the given timestamp, formatted as a XSD-timestamp.","schema":{"type":"string"}},{"name":"state","in":"query","description":"Represents the state (e.g. SENT, DELIVERED, ACCEPTED) of the searched documents.\nCan be used multiple times, which is interpreted as OR.\nAccepted values are: UNDETERMINED, IN_TRANSIT, PENDING_NOT_A_CONTACT, FAILED_DELIVERY, SENT, DELIVERED, ACCEPTED, OVERDUE, PAID_UNCONFIRMED, PAID_CONFIRMED, REJECTED_BY_SENDER, REJECTED_BY_RECEIVER, DISPUTED_BY_RECEIVER, CLOSED, REPLACED, AWAITING_ASSISTANCE, ASSISTANCE_PROVIDED, CANCELED, ASSISTANCE_CANCELED, PUNCHOUT_SENT, PUNCHOUT_EDIT.\n","schema":{"type":"string"}},{"name":"ordering","in":"query","description":"Result ordering (e.g. DueDate, Amount, Date).","schema":{"default":"LastEdit","type":"string"}},{"name":"sales","in":"query","description":"Whether document is sale or not.","schema":{"type":"boolean"}},{"name":"query","in":"query","description":"Text to search.","schema":{"type":"string"}},{"name":"copyIndicator","in":"query","description":"Whether to search only copies of documents, originals or both.","schema":{"type":"boolean"}},{"name":"onlycopies","in":"query","description":"Whether to search only copies of documents.","schema":{"default":false,"type":"boolean"}},{"name":"conversationId","in":"query","description":"The document conversation id used for getting its related documents.","schema":{"type":"string"}},{"name":"totalFrom","in":"query","description":"It represents the minimum value of the total range that can be used to filter documents.","schema":{"type":"number"}},{"name":"totalTo","in":"query","description":"It represents the maximum value of the total range that can be used to filter documents.","schema":{"type":"number"}},{"name":"currency","in":"query","description":"It represents the currency that can be used to filter documents only of that currency.","schema":{"type":"string"}},{"name":"useOrOperatorForProperties","in":"query","description":"It sets the property based search to meet at least one criteria within the set of provided filters.","schema":{"type":"boolean"}},{"name":"page","in":"query","description":"Result page to return. Each page has 'limit' number of results.","schema":{"default":0,"type":"integer"}},{"name":"id","in":"query","description":"The documents to get DocumentInformation for (a Tradeshift UUID value)","schema":{"type":"string"}},{"name":"sentBy","in":"query","description":"Sender company tenant id (a Tradeshift UUID value).","schema":{"type":"string"}},{"name":"sentTo","in":"query","description":"Receiver company tenant ids (a Tradeshift UUID value).","schema":{"type":"string"}},{"name":"processState","in":"query","description":"The _user_ state the document must have (see /metadata). Can be used multiple times, which is interpreted as OR. Note that this parameter is misnamed as it searches among all user states, not just process state.","schema":{"type":"string"}},{"name":"withoutProcessState","in":"query","description":"The process state the document must not have (see /metadata). Can be used multiple times, which is interpreted as AND. Note that this parameter is misnamed as it searches among all user states, not just process state.","schema":{"type":"string"}},{"name":"branchId","in":"query","description":"Document business ids. Can be used multiple times, which is interpreted as OR.","schema":{"type":"string"}},{"name":"totals","in":"query","description":"Whether to calculate the documents total amount or not.","schema":{"default":false,"type":"boolean"}},{"name":"onlydrafts","in":"query","description":"Whether to search only drafts.","schema":{"default":false,"type":"boolean"}},{"name":"onlydeleted","in":"query","description":"Whether to search only deleted documents.","schema":{"default":false,"type":"boolean"}},{"name":"requesterId","in":"query","description":"This field can be used to filter documents by the given list of requester Ids, only applicable for Purchase Request Documents. The requester is either the creating person or the document or if specified the \"on behalf of\" person\n","schema":{"type":"string"}},{"name":"invoiceTypeCode","in":"query","description":"This field represents the type of invoice for an invoice document. If the field is missing then we will have a normal/commercial invoice filter. For value 325 proforma invoice type will be searched and for value 386 we will have prepayment invoice.\n","schema":{"type":"array","items":{"type":"number"}}},{"name":"profileId","in":"query","description":"It represents the profile id of a given document.","schema":{"type":"string"}}],"x-annotation-dx-category":"documents-document","summary":"find documents (CSV support)","tags":["dx-category--documents-document"]}},"/rest/external/documents/dispatcher":{"post":{"responses":{"201":{"description":"201 (Created) Indicates the document was created and dispatched. The Location response header will contain the URI of the dispatch of the new document.\n","content":{"text/xml":{"example":"<DocumentDispatchResponse xmlns=\"http://tradeshift.com/api/public/1.0\">\n    <DocumentId>e4f2e813-dfff-4609-8317-912da569238e</DocumentId>\n    <DispatchId>52109541-64b9-4dce-980b-46d972cc8bfd</DispatchId>\n</DocumentDispatchResponse>","schema":{"type":"object"}}}},"400":{"description":"Bad Request due to invalid input.","content":{"text/xml":{"example":{"ErrorCode":"BadRequest","Message":"Could not resolve type nonExistentType","ErrorDetail":[{"Key":"message","Value":"Could not resolve type nonExistentType"},{"Key":"stacktrace","Value":"com.tradeshift.commons.exception.BadRequestException: Could not resolve type nonExistentType\n\tat com.tradeshift.coding.rest.CodingResource.getCodingLists(CodingResource.java:85)\n\t"}],"ValidationError":[],"RequestId":"2c941598-489c-4fac-8543-03cb921feaf7"},"schema":{"title":"Tradeshift Public API 1.0 - TradeshiftException","required":["ErrorCode","Message","RequestId"],"type":"object","additionalProperties":false,"properties":{"ErrorCode":{"type":"string"},"Message":{"type":"string"},"ErrorDetail":{"type":"array","items":{"type":"object","additionalProperties":false,"properties":{"Key":{"type":"string"},"Value":{"type":"string"}},"required":["Key","Value"]}},"ValidationError":{"type":"array","items":{"type":"object"}},"RequestId":{"pattern":"^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$","description":"String representation of an Universally unique identifier (UUID), version 5. See RFC 4122","type":"string"}}}}}}},"description":"Store and dispatch the document - the actual document content must be sent as the entity/body of the POST call.\n","operationId":"post-rest-external-documents-dispatcher","requestBody":{"content":{"text/xml":{"example":"<ApplicationResponse xmlns=\"urn:oasis:names:specification:ubl:schema:xsd:ApplicationResponse-2\" xmlns:cac=\"urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2\"\n  xmlns:cbc=\"urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2\" xmlns:ccts=\"urn:oasis:names:specification:ubl:schema:xsd:CoreComponentParameters-2\"\n  xmlns:sdt=\"urn:oasis:names:specification:ubl:schema:xsd:SpecializedDatatypes-2\" xmlns:udt=\"urn:un:unece:uncefact:data:specification:UnqualifiedDataTypesSchemaModule:2\"\n  xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"urn:oasis:names:specification:ubl:schema:xsd:ApplicationResponse-2 UBL-ApplicationResponse-2.0.xsd\">\n  <cbc:UBLVersionID>2.0</cbc:UBLVersionID>\n  <cbc:CustomizationID>urn:tradeshift.com:ubl-2.0-customizations:2010-06</cbc:CustomizationID>\n  <cbc:ProfileID schemeAgencyID='CEN/ISSS WS/BII' schemeID='CWA 16073:2010' schemeVersionID='1'>urn:www.cenbii.eu:profile:bii04:ver1.0</cbc:ProfileID>\n  <cbc:ID>123456789</cbc:ID>\n  <cbc:IssueDate>2017-11-28</cbc:IssueDate>\n  <cbc:IssueTime>12:00:00</cbc:IssueTime>\n  <cac:SenderParty>\n    <cac:PartyIdentification>\n      <cbc:ID schemeID=\"TS:ID\">4a8fc13e-2dc5-4fc6-a20e-6835484b83c2</cbc:ID>\n    </cac:PartyIdentification>\n    <cac:PartyName>\n      <cbc:Name>Sender Name</cbc:Name>\n    </cac:PartyName>\n    <cac:Contact>\n      <cbc:ElectronicMail>user@email.com</cbc:ElectronicMail>\n    </cac:Contact>\n  </cac:SenderParty>\n  <cac:ReceiverParty>\n    <cac:PartyIdentification>\n      <cbc:ID schemeID=\"TS:ID\">e27b5bdd-fe23-4c82-b069-e89a596b519d</cbc:ID>\n    </cac:PartyIdentification>\n    <cac:PartyName>\n      <cbc:Name>Receiver Name</cbc:Name>\n    </cac:PartyName>\n    <cac:Contact>\n      <cbc:ElectronicMail>user@email.com</cbc:ElectronicMail>\n    </cac:Contact>\n  </cac:ReceiverParty>\n  <cac:DocumentResponse>\n    <cac:Response>\n      <cbc:ReferenceID>1</cbc:ReferenceID>\n      <cbc:ResponseCode listID=\"urn:tradeshift.com:api:1.0:responsecode\">BusinessAccept</cbc:ResponseCode>\n      <cbc:Description>Your invoice is now BusinessAccept</cbc:Description>\n    </cac:Response>\n    <cac:DocumentReference>\n      <cbc:ID>987654321</cbc:ID>\n      <cbc:IssueDate>2017-11-28</cbc:IssueDate>\n      <cbc:DocumentTypeCode listID=\"urn:tradeshift.com:api:1.0:documenttypecode\">Invoice</cbc:DocumentTypeCode>\n    </cac:DocumentReference>\n  </cac:DocumentResponse>\n</ApplicationResponse>\n","schema":{"type":"object"}},"application/xml":{"example":"<ApplicationResponse xmlns=\"urn:oasis:names:specification:ubl:schema:xsd:ApplicationResponse-2\" xmlns:cac=\"urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2\"\n  xmlns:cbc=\"urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2\" xmlns:ccts=\"urn:oasis:names:specification:ubl:schema:xsd:CoreComponentParameters-2\"\n  xmlns:sdt=\"urn:oasis:names:specification:ubl:schema:xsd:SpecializedDatatypes-2\" xmlns:udt=\"urn:un:unece:uncefact:data:specification:UnqualifiedDataTypesSchemaModule:2\"\n  xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"urn:oasis:names:specification:ubl:schema:xsd:ApplicationResponse-2 UBL-ApplicationResponse-2.0.xsd\">\n  <cbc:UBLVersionID>2.0</cbc:UBLVersionID>\n  <cbc:CustomizationID>urn:tradeshift.com:ubl-2.0-customizations:2010-06</cbc:CustomizationID>\n  <cbc:ProfileID schemeAgencyID='CEN/ISSS WS/BII' schemeID='CWA 16073:2010' schemeVersionID='1'>urn:www.cenbii.eu:profile:bii04:ver1.0</cbc:ProfileID>\n  <cbc:ID>123456789</cbc:ID>\n  <cbc:IssueDate>2017-11-28</cbc:IssueDate>\n  <cbc:IssueTime>12:00:00</cbc:IssueTime>\n  <cac:SenderParty>\n    <cac:PartyIdentification>\n      <cbc:ID schemeID=\"TS:ID\">4a8fc13e-2dc5-4fc6-a20e-6835484b83c2</cbc:ID>\n    </cac:PartyIdentification>\n    <cac:PartyName>\n      <cbc:Name>Sender Name</cbc:Name>\n    </cac:PartyName>\n    <cac:Contact>\n      <cbc:ElectronicMail>user@email.com</cbc:ElectronicMail>\n    </cac:Contact>\n  </cac:SenderParty>\n  <cac:ReceiverParty>\n    <cac:PartyIdentification>\n      <cbc:ID schemeID=\"TS:ID\">e27b5bdd-fe23-4c82-b069-e89a596b519d</cbc:ID>\n    </cac:PartyIdentification>\n    <cac:PartyName>\n      <cbc:Name>Receiver Name</cbc:Name>\n    </cac:PartyName>\n    <cac:Contact>\n      <cbc:ElectronicMail>user@email.com</cbc:ElectronicMail>\n    </cac:Contact>\n  </cac:ReceiverParty>\n  <cac:DocumentResponse>\n    <cac:Response>\n      <cbc:ReferenceID>1</cbc:ReferenceID>\n      <cbc:ResponseCode listID=\"urn:tradeshift.com:api:1.0:responsecode\">BusinessAccept</cbc:ResponseCode>\n      <cbc:Description>Your invoice is now BusinessAccept</cbc:Description>\n    </cac:Response>\n    <cac:DocumentReference>\n      <cbc:ID>987654321</cbc:ID>\n      <cbc:IssueDate>2017-11-28</cbc:IssueDate>\n      <cbc:DocumentTypeCode listID=\"urn:tradeshift.com:api:1.0:documenttypecode\">Invoice</cbc:DocumentTypeCode>\n    </cac:DocumentReference>\n  </cac:DocumentResponse>\n</ApplicationResponse>\n","schema":{"type":"object"}}},"required":true},"parameters":[{"name":"documentId","in":"query","required":true,"description":"A client-generated id for the new document to be dispatched\n","schema":{"type":"string"}},{"name":"documentProfileId","in":"query","required":true,"description":"The document profile id that the document adheres to (e.g. \\\"nes.p5.invoice.ubl.2.1.dk\\\"), from the 'documentprofiles' resource\n","schema":{"type":"string"}},{"name":"documentSource","in":"query","description":"Track the document's source - We save the source of the document in a new table called documentsource so that we know where the document was dispatched from.","schema":{"type":"string"}}],"x-annotation-dx-category":"documents-document","summary":"send document","tags":["dx-category--documents-document"]}},"/rest/external/documents/dispatches":{"get":{"responses":{"200":{"description":"The list the latest dispatch information, if found. If no document is found then an empty list is returned.\n","content":{"application/json":{"schema":{"example":{"DispatchId":"2ecdb6ac-b133-4c7c-80aa-650391af98f6","ObjectId":"383eb7da-31dd-5c4e-878c-026443e46067","Created":"2016-09-02T01:07:21.461Z","SenderUserId":"63ef84c2-83c0-473b-a634-3a57d8109b39","DispatchState":"COMPLETED","LastStateChange":"2016-09-02T01:07:21.461Z","ReceiverConnectionId":"44dc8810-e582-5252-963b-20fd0754765f","DispatchChannel":"EMAIL"}}}}}},"description":"Get a list of the latest dispatch information by object IDs. The returned data contains information like:\nthe creation time of the dispatch, the dispatch sender, the channel through which the document is dispatched,\nthe current dispatch state, the ID of the object being dispatched, the connection ID used for dispatching and\ntechnical information containing the reason why a dispatch failed (returned only for failed dispatches).\n","operationId":"get-rest-external-documents-dispatches","parameters":[{"name":"Accept","in":"header","required":true,"description":"The MIME media type of the response content. Example: text/xml, application/json, application/*\n","schema":{"default":"text/xml","type":"string"}},{"name":"documentId","in":"query","description":"List of document UUID identifiers","schema":{"type":"string"}},{"name":"accept","in":"query","description":"Media type for response","schema":{"type":"string"}}],"x-annotation-dx-category":"documents-document","summary":"Get Latest Dispatches","tags":["dx-category--documents-document"]}},"/rest/external/documents/netAmount":{"get":{"responses":{"200":{"description":"The list of documents with corresponding net amount."},"404":{"description":"Bad request error"}},"description":"Gets a list of document net amounts for a list of document ids.","operationId":"get-rest-external-documents-netamount","parameters":[{"name":"Accept","in":"header","required":true,"description":"Media types which are acceptable for the response. The possible values are text/xml and application/json.","schema":{"enum":["application/xml","application/json"],"type":"string"}},{"name":"documentIds","in":"query","required":true,"description":"The document uuid. Can be used multiple times.","schema":{"type":"string"}}],"x-annotation-dx-category":"documents-document","summary":"get document net amount","tags":["dx-category--documents-document"]}},"/rest/external/documents/quotes/template":{"get":{"responses":{"200":{"description":"","content":{"application/json":{"example":{"DocumentProfileId":"tradeshift.quote.1.0","TaxCategories":{"StackedTaxes":[],"DefaultTaxIndex":0},"Ubl":{"DocumentType":"QuotationType","UBLVersionID":{"value":"2.0"},"CustomizationID":{"value":"urn:tradeshift.com:ubl-2.0-customizations:2010-06"},"ProfileID":{"value":"urn:www.cenbii.eu:profile:bii04:ver1.0","schemeID":"CWA 16073:2010","schemeAgencyID":"CEN/ISSS WS/BII","schemeVersionID":"1"},"ID":{"value":"1"},"IssueDate":{"value":"2017-04-06"},"PricingCurrencyCode":{"value":"CNY"},"AdditionalDocumentReference":[{"ID":{"value":"HALF_EVEN"},"DocumentTypeCode":{"value":"RoundingRule","listID":"urn:tradeshift.com:api:1.0:documenttypecode"}}],"SellerSupplierParty":{"Party":{"PartyIdentification":[{"ID":{"value":"c9989bf0-0bf4-4500-86e9-af8edfcca6eb","schemeID":"TS:ID"}}],"PartyName":[{"Name":{"value":"Test Supplier"}}],"PostalAddress":{"AddressFormatCode":{"value":"5","listID":"UN/ECE 3477","listAgencyID":"6","listVersionID":"D08B"},"StreetName":{"value":"street"},"BuildingNumber":{"value":"6"},"CityName":{"value":"city"},"PostalZone":{"value":"100000"},"CountrySubentity":{"value":"test"},"Country":{"IdentificationCode":{"value":"CN"}}},"Contact":{"ID":{"value":"1"},"Name":{"value":"Steve Armstrong"}},"Person":{"FirstName":{"value":"Steve"},"FamilyName":{"value":"Armstrong"}}}},"QuotedMonetaryTotal":{"LineExtensionAmount":{"value":0,"currencyID":"CNY"},"TaxExclusiveAmount":{"value":0,"currencyID":"CNY"},"TaxInclusiveAmount":{"value":0,"currencyID":"CNY"},"PayableAmount":{"value":0,"currencyID":"CNY"}}},"DocumentProfile":{"AttachmentRequired":false,"DocumentProfileId":"tradeshift.quote.1.0","PaymentMeansCode":["10","20","42","porta-31-a"],"DocumentType":"quote","DocumentFields":[]}},"schema":{"type":"object","properties":{"DocumentProfile":{"type":"object","properties":{"AttachmentRequired":{"type":"boolean"},"DocumentFields":{"type":"array","items":{"type":"string"}},"DocumentProfileId":{"type":"string"},"DocumentType":{"type":"string"},"PaymentMeansCode":{"type":"array","items":{"type":"string"}}},"required":["AttachmentRequired","DocumentFields","DocumentProfileId","DocumentType","PaymentMeansCode"]},"DocumentProfileId":{"type":"string"},"TaxCategories":{"type":"object","properties":{"DefaultTaxIndex":{"type":"integer"},"StackedTaxes":{"type":"array","items":{"type":"string"}}},"required":["DefaultTaxIndex","StackedTaxes"]},"Ubl":{"type":"object","properties":{"AdditionalDocumentReference":{"type":"array","items":{"type":"object","properties":{"DocumentTypeCode":{"type":"object","properties":{"listID":{"type":"string"},"value":{"type":"string"}},"required":["listID","value"]},"ID":{"type":"object","properties":{"value":{"type":"string"}},"required":["value"]}},"required":["DocumentTypeCode","ID"]}},"CustomizationID":{"type":"object","properties":{"value":{"type":"string"}},"required":["value"]},"DocumentType":{"type":"string"},"ID":{"type":"object","properties":{"value":{"type":"string"}},"required":["value"]},"IssueDate":{"type":"object","properties":{"value":{"type":"string"}},"required":["value"]},"PricingCurrencyCode":{"type":"object","properties":{"value":{"type":"string"}},"required":["value"]},"ProfileID":{"type":"object","properties":{"schemeAgencyID":{"type":"string"},"schemeID":{"type":"string"},"schemeVersionID":{"type":"string"},"value":{"type":"string"}},"required":["schemeAgencyID","schemeID","schemeVersionID","value"]},"QuotedMonetaryTotal":{"type":"object","properties":{"LineExtensionAmount":{"type":"object","properties":{"currencyID":{"type":"string"},"value":{"type":"integer"}},"required":["currencyID","value"]},"PayableAmount":{"type":"object","properties":{"currencyID":{"type":"string"},"value":{"type":"integer"}},"required":["currencyID","value"]},"TaxExclusiveAmount":{"type":"object","properties":{"currencyID":{"type":"string"},"value":{"type":"integer"}},"required":["currencyID","value"]},"TaxInclusiveAmount":{"type":"object","properties":{"currencyID":{"type":"string"},"value":{"type":"integer"}},"required":["currencyID","value"]}},"required":["LineExtensionAmount","PayableAmount","TaxExclusiveAmount","TaxInclusiveAmount"]},"SellerSupplierParty":{"type":"object","properties":{"Party":{"type":"object","properties":{"Contact":{"type":"object","properties":{"ID":{"type":"object","properties":{"value":{"type":"string"}},"required":["value"]},"Name":{"type":"object","properties":{"value":{"type":"string"}},"required":["value"]}},"required":["ID","Name"]},"PartyIdentification":{"type":"array","items":{"type":"object","properties":{"ID":{"type":"object","properties":{"schemeID":{"type":"string"},"value":{"type":"string"}},"required":["schemeID","value"]}},"required":["ID"]}},"PartyName":{"type":"array","items":{"type":"object","properties":{"Name":{"type":"object","properties":{"value":{"type":"string"}},"required":["value"]}},"required":["Name"]}},"Person":{"type":"object","properties":{"FamilyName":{"type":"object","properties":{"value":{"type":"string"}},"required":["value"]},"FirstName":{"type":"object","properties":{"value":{"type":"string"}},"required":["value"]}},"required":["FamilyName","FirstName"]},"PostalAddress":{"type":"object","properties":{"AddressFormatCode":{"type":"object","properties":{"listAgencyID":{"type":"string"},"listID":{"type":"string"},"listVersionID":{"type":"string"},"value":{"type":"string"}},"required":["listAgencyID","listID","listVersionID","value"]},"BuildingNumber":{"type":"object","properties":{"value":{"type":"string"}},"required":["value"]},"CityName":{"type":"object","properties":{"value":{"type":"string"}},"required":["value"]},"Country":{"type":"object","properties":{"IdentificationCode":{"type":"object","properties":{"value":{"type":"string"}},"required":["value"]}},"required":["IdentificationCode"]},"CountrySubentity":{"type":"object","properties":{"value":{"type":"string"}},"required":["value"]},"PostalZone":{"type":"object","properties":{"value":{"type":"string"}},"required":["value"]},"StreetName":{"type":"object","properties":{"value":{"type":"string"}},"required":["value"]}},"required":["AddressFormatCode","BuildingNumber","CityName","Country","CountrySubentity","PostalZone","StreetName"]}},"required":["Contact","PartyIdentification","PartyName","Person","PostalAddress"]}},"required":["Party"]},"UBLVersionID":{"type":"object","properties":{"value":{"type":"string"}},"required":["value"]}},"required":["AdditionalDocumentReference","CustomizationID","DocumentType","ID","IssueDate","PricingCurrencyCode","ProfileID","QuotedMonetaryTotal","SellerSupplierParty","UBLVersionID"]}},"required":["DocumentProfile","DocumentProfileId","TaxCategories","Ubl"]}}}}},"description":"Get a quote template.","operationId":"get-rest-external-documents-quotes-template","parameters":[{"name":"connectionId","in":"query","description":"The receiving connection id. It is used to preset data in template.","schema":{"type":"string"}},{"name":"companyAccountId","in":"query","description":"The receiver company id. It is used to preset data in template.","schema":{"type":"string"}},{"name":"quoteId","in":"query","description":"The receiver company id. It is used to preset data in template.","schema":{"type":"string"}}],"x-annotation-dx-category":"documents-quotes","summary":"get quote template","tags":["dx-category--documents-quotes"]}},"/rest/external/documents/receiptadvices/bynumber/{number}":{"parameters":[{"name":"number","in":"path","required":true,"schema":{"type":"string"},"description":"Business id of the receipt advice document"}],"head":{"responses":{"200":{"description":"Document exists"},"404":{"description":"Document not found"}},"description":"Check for the existence of a document via its business id","operationId":"head-rest-external-documents-receiptadvices-bynumber-number","x-annotation-dx-category":"documents-receipt_advices","summary":"receipt advices by number","tags":["dx-category--documents-receipt_advices"]}},"/rest/external/documents/receiptadvices/nextnumber":{"get":{"responses":{"200":{"description":"","content":{"text/plain":{"schema":{"example":"\"27\""}}}},"400":{"description":""},"401":{"description":""},"404":{"description":"","content":{"text/xml":{"schema":{"example":"<ns6:ResponseError xmlns:cec=\"urn:oasis:names:specification:ubl:schema:xsd:CommonExtensionComponents-2\" xmlns:cac=\"urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2\" xmlns:cbc=\"urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2\" xmlns:ns6=\"http://tradeshift.com/api/1.0\" xmlns:ns20=\"urn:oasis:names:specification:ubl:schema:xsd:OrderResponseSimple-2\" xmlns:ns8=\"urn:oasis:names:specification:ubl:schema:xsd:ApplicationResponse-2\" xmlns:ns7=\"http://tradeshift.com/api/2.0\" xmlns:ns13=\"urn:oasis:names:specification:ubl:schema:xsd:CreditNote-2\" xmlns:ns9=\"urn:oasis:names:specification:ubl:schema:xsd:OrderCancellation-2\" xmlns:ns12=\"urn:oasis:names:specification:ubl:schema:xsd:Quotation-2\" xmlns:ns11=\"urn:oasis:names:specification:ubl:schema:xsd:Invoice-2\" xmlns:ns22=\"urn:oasis:names:specification:ubl:schema:xsd:RequestForQuotation-2\" xmlns:ns10=\"urn:oasis:names:specification:ubl:schema:xsd:DespatchAdvice-2\" xmlns:ns21=\"urn:oasis:names:specification:ubl:schema:xsd:OrderResponse-2\" xmlns:ns17=\"urn:oasis:names:specification:ubl:schema:xsd:RemittanceAdvice-2\" xmlns:ns16=\"urn:oasis:names:specification:ubl:schema:xsd:Reminder-2\" xmlns:ns15=\"urn:oasis:names:specification:ubl:schema:xsd:OrderChange-2\" xmlns:ns14=\"urn:oasis:names:specification:ubl:schema:xsd:Order-2\" xmlns:ns19=\"urn:oasis:names:specification:ubl:schema:xsd:Catalogue-2\" xmlns:ts=\"http://tradeshift.com/api/public/1.0\" xmlns:ns18=\"urn:oasis:names:specification:ubl:schema:xsd:ReceiptAdvice-2\">\n    <ns6:ErrorCode>ResourceNotFound</ns6:ErrorCode>\n    <ns6:Message>Error&amp;#x3a; ResourceNotFound&amp;#x3a; The object did not exist</ns6:Message>\n    <ns6:RequestId>fff29544-8039-499f-91c5-b3c9e4e3d8b1</ns6:RequestId>\n</ns6:ResponseError>\n"}}}}},"description":"Get next available business id","operationId":"get-rest-external-documents-receiptadvices-nextnumber","x-annotation-dx-category":"documents-receipt_advices","summary":"next available receipt advice","tags":["dx-category--documents-receipt_advices"]}},"/rest/external/documents/received/{documentId}":{"parameters":[{"name":"documentId","in":"path","required":true,"schema":{"type":"string"},"description":"The new document's id"}],"put":{"responses":{"204":{"description":"Successful receival of the document\n"},"400":{"description":"No document supplied in the body\n"}},"description":"This endpoint saves the content of a document for cases when a company has received a document outside of the\nTradeshift platform but wants to add it to the document list anyway. It imports a document as if it has been\nreceived at some point in time. It will be visible in the document list, but replies, such as comments, will\nnot be possible. Only the receiver side copy is created and the original sender will not be notified even if\nthey are on the platform and they are connected.\n","operationId":"put-rest-external-documents-received-documentid","requestBody":{"content":{"*/*":{"schema":{"properties":{"file":{"description":"The content of the document","type":"string"}},"required":["file"],"type":"object"}}},"required":true},"parameters":[{"name":"Content-Type","in":"header","required":true,"description":"The MIME media type of the request content. Example: */*\n","schema":{"type":"string"}}],"x-annotation-dx-category":"documents-document","summary":"Receive document","tags":["dx-category--documents-document"]}},"/rest/external/documents/requisitions/RequisitionLine":{"post":{"responses":{"201":{"description":"","content":{"application/vnd.oasis.ubl+json":{"schema":{"example":{"_B":"urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2","_S":"urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2","_D":"http://tradeshift.com/api/public/1.0","Requisition":[{"ID":[{"IdentifierContent":"bac9a69c-ec35-4a12-a455-9fb57c24dbfb"}],"Note":[{"TextContent":"I want to request a purchase"}],"OrderDocumentReference":[{"ID":[{"IdentifierContent":"order-01"}]},{"ID":[{"IdentifierContent":"order-02"}]}],"OriginatorCustomerParty":[{"Party":[{"Contact":[{"ID":[{"IdentificationSchemeUniformResourceIdentifier":"http://tradeshift.com/api/1.0/userId","IdentifierContent":"UUID"}],"ElectronicMail":[{"TextContent":"john@johnsson.se"}]}]}]}],"Delivery":[{"DeliveryLocation":[{"Address":[{"ID":[{"IdentificationSchemeIdentifier":"GLN","IdentificationSchemeAgencyIdentifier":"9","IdentifierContent":"1234567890123"}],"Postbox":[{"TextContent":"123"}],"StreetName":[{"TextContent":"Rådhusgatan"}],"AdditionalStreetName":[{"TextContent":"2nd floor"}],"BuildingNumber":[{"TextContent":"5"}],"Department":[{"TextContent":"Purchasing departmen"}],"CityName":[{"TextContent":"Stockholm"}],"PostalZone":[{"TextContent":"11000"}],"Region":[{"TextContent":"RegionX"}],"Country":[{"IdentificationCode":[{"CodeContent":"SE"}]}]}]}]}],"AnticipatedMonetaryTotal":[{"PayableAmount":[{"AmountCurrencyIdentifier":"USD","AmountContent":2108}]}],"RequisitionLine":[{"RequisitionPurposeCode":[{"CodeListIdentifier":"urn:tradeshift.com:api:1.0:requisitionlinepurposecode","CodeContent":"BLANKET_PURCHASE_ORDER"}],"SupplierSharedPrice":[{"PriceAmount":[{"AmountCurrencyIdentifier":"USD","AmountContent":100}]}],"LineItem":[{"ID":[{"IdentifierContent":"1"}],"Note":[{"TextContent":"Freetext note on line 1"}],"Quantity":[{"QuantityUnitCode":"EA","QuantityContent":1}],"LineExtensionAmount":[{"AmountCurrencyIdentifier":"USD","AmountContent":1200}],"AccountingCostCode":[{"CodeContent":"ProjectID123"}],"Price":[{"PriceAmount":[{"AmountCurrencyIdentifier":"USD","AmountContent":1200}],"BaseQuantity":[{"QuantityUnitCode":"EA","QuantityContent":1}],"ValidityPeriod":[{"StartDate":[{"DateContent":"1977-05-15"}]},{"EndDate":[{"DateContent":"1977-05-15"}]}]}],"Item":[{"Description":[{"TextContent":"I want a brown sofa"}],"SellersItemIdentification":[{"IssuerParty":[{"PartyIdentification":[{"ID":[{"IdentifierContent":"444666777"}]}],"PartyName":[{"Name":[{"TextContent":"Sofastore"}]}]}]}],"CommodityClassification":[{"ItemClassificationCode":[{"CodeListIdentifier":"UNSPSC","CodeListAgencyIdentifier":"113","CodeContent":"56101502"}]}]}]}],"DocumentReference":[{"ID":[{"IdentifierContent":"order-01"}]}]}],"UBLVersionID":[{"IdentifierContent":"2.0"}],"CustomizationID":[{"IdentifierContent":"urn:tradeshift.com:ubl-2.0-customizations:2010-06"}],"ProfileID":[{"IdentificationSchemeIdentifier":"CWA 16073:2010","IdentificationSchemeAgencyIdentifier":"1","IdentificationSchemeAgencyNameText":"CEN/ISSS WS/BII","IdentifierContent":"urn:www.cenbii.eu:profile:bii04:ver1.0"}],"CreationDate":[{"DateContent":"1977-05-15"}],"CreationTime":[{"TimeContent":"1977-05-15"}],"BuyerCustomerParty":[{"Party":[{"PartyIdentification":[{"ID":[{"IdentificationSchemeIdentifier":"TS:ID","IdentifierContent":"79eec713-cd84-4a4d-86b5-e35527ef3b3b"}]}],"PartyName":[{"Name":[{"TextContent":"Zurich"}]}],"Contact":[{"ID":[{"IdentificationSchemeUniformResourceIdentifier":"http://tradeshift.com/api/1.0/userId","IdentifierContent":"UUID"}],"ElectronicMail":[{"TextContent":"pelle@johnsson.se"}]}]}]}]}]}}}}}},"description":"Create a new Requisition from the requisition template containing the provided line","operationId":"post-rest-external-documents-requisitions-requisitionline","requestBody":{"content":{"application/vnd.oasis.ubl+json":{"example":{"_B":"urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2","_S":"urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2","_D":"http://tradeshift.com/api/public/1.0","RequisitionLine":[{"RequisitionPurposeCode":[{"CodeListIdentifier":"urn:tradeshift.com:api:1.0:requisitionlinepurposecode","CodeContent":"BLANKET_PURCHASE_ORDER"}],"SupplierSharedPrice":[{"PriceAmount":[{"AmountCurrencyIdentifier":"USD","AmountContent":100}]}],"LineItem":[{"ID":[{"IdentifierContent":"1"}],"Note":[{"TextContent":"Freetext note on line 1"}],"Quantity":[{"QuantityUnitCode":"EA","QuantityContent":1}],"LineExtensionAmount":[{"AmountCurrencyIdentifier":"USD","AmountContent":1200}],"AccountingCostCode":[{"CodeContent":"ProjectID123"}],"Price":[{"PriceAmount":[{"AmountCurrencyIdentifier":"USD","AmountContent":1200}],"BaseQuantity":[{"QuantityUnitCode":"EA","QuantityContent":1}],"ValidityPeriod":[{"StartDate":[{"DateContent":"1977-05-15"}]},{"EndDate":[{"DateContent":"1977-05-15"}]}]}],"Item":[{"Description":[{"TextContent":"I want a brown sofa"}],"SellersItemIdentification":[{"IssuerParty":[{"PartyIdentification":[{"ID":[{"IdentifierContent":"444666777"}]}],"PartyName":[{"Name":[{"TextContent":"Sofastore"}]}]}]}],"CommodityClassification":[{"ItemClassificationCode":[{"CodeListIdentifier":"UNSPSC","CodeListAgencyIdentifier":"113","CodeContent":"56101502"}]}]}]}],"DocumentReference":[{"ID":[{"IdentifierContent":"order-01"}]}]}]},"schema":{"type":"string"}}},"required":true},"x-annotation-dx-category":"documents-requisitions","summary":"create requisition","tags":["dx-category--documents-requisitions"]}},"/rest/external/documents/requisitions/RequisitionLine/template":{"get":{"responses":{"200":{"description":"","content":{"application/vnd.oasis.ubl+json":{"schema":{"example":{"_B":"urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2","_S":"urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2","_D":"http://tradeshift.com/api/public/1.0","RequisitionLine":[{"RequisitionPurposeCode":[{"CodeListIdentifier":"urn:tradeshift.com:api:1.0:requisitionlinepurposecode","CodeContent":"BLANKET_PURCHASE_ORDER"}],"SupplierSharedPrice":[{"PriceAmount":[{"AmountCurrencyIdentifier":"USD","AmountContent":100}]}],"LineItem":[{"ID":[{"IdentifierContent":"1"}],"Note":[{"TextContent":"Freetext note on line 1"}],"Quantity":[{"QuantityUnitCode":"EA","QuantityContent":1}],"LineExtensionAmount":[{"AmountCurrencyIdentifier":"USD","AmountContent":1200}],"AccountingCostCode":[{"CodeContent":"ProjectID123"}],"Price":[{"PriceAmount":[{"AmountCurrencyIdentifier":"USD","AmountContent":1200}],"BaseQuantity":[{"QuantityUnitCode":"EA","QuantityContent":1}],"ValidityPeriod":[{"StartDate":[{"DateContent":"1977-05-15"}]},{"EndDate":[{"DateContent":"1977-05-15"}]}]}],"Item":[{"Description":[{"TextContent":"I want a brown sofa"}],"SellersItemIdentification":[{"IssuerParty":[{"PartyIdentification":[{"ID":[{"IdentifierContent":"444666777"}]}],"PartyName":[{"Name":[{"TextContent":"Sofastore"}]}]}]}],"CommodityClassification":[{"ItemClassificationCode":[{"CodeListIdentifier":"UNSPSC","CodeListAgencyIdentifier":"113","CodeContent":"56101502"}]}]}]}],"DocumentReference":[{"ID":[{"IdentifierContent":"order-01"}]}]}]}}}}}},"description":"Get a requisition line template.","operationId":"get-rest-external-documents-requisitions-requisitionline-template","x-annotation-dx-category":"documents-requisitions","summary":"get requisition line template","tags":["dx-category--documents-requisitions"]}},"/rest/external/documents/requisitions/create/fromquote":{"put":{"responses":{"200":{"description":"UUID of the requisition document, that was created from given quote"},"400":{"description":"Bad request error.","content":{"application/json":{"example":{"ErrorCode":"BadRequest","Message":"Could not resolve type nonExistentType","ErrorDetail":[{"Key":"message","Value":"Could not resolve type nonExistentType"},{"Key":"stacktrace","Value":"com.tradeshift.commons.exception.BadRequestException: Could not resolve type nonExistentType\n\tat com.tradeshift.coding.rest.CodingResource.getCodingLists(CodingResource.java:85)\n\t"}],"ValidationError":[],"RequestId":"2c941598-489c-4fac-8543-03cb921feaf7"},"schema":{"title":"Tradeshift Private API 1.0 - ResponseError","required":["RequestId","ErrorCode","Message"],"type":"object","additionalProperties":false,"properties":{"RequestId":{"description":"Unique identifier (UUID) of the request causing the error.","pattern":"^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$","type":"string"},"ErrorCode":{"type":"string"},"Message":{"type":"string"},"ErrorDetail":{"type":"array","items":{"required":["Key","Value"],"type":"object","properties":{"Key":{"type":"string"},"Value":{"type":"string"}}}},"ValidationError":{"type":"array","items":{"type":"object","properties":{"ErrorCode":{"type":"string"},"SubErrorCode":{"type":"string"},"ErrorDetail":{"type":"array","items":{"required":["Key","Value"],"type":"object","properties":{"Key":{"type":"string"},"Value":{"type":"string"}}}},"Index":{"type":"integer"},"Message":{"type":"string"}},"required":["ErrorCode","SubErrorCode","ErrorDetail","Index","Message"]}}}}}}}},"description":"Create a new requisition from given quote and save it as a draft","operationId":"put-rest-external-documents-requisitions-create-fromquote","requestBody":{"content":{"text/plain":{"example":"a7e78a06-81da-4221-8432-84a10012da7b","schema":{"type":"string"}}},"required":true},"x-annotation-dx-category":"documents-requisitions","summary":"create requisition from quote","tags":["dx-category--documents-requisitions"]}},"/rest/external/documents/requisitions/spawn":{"post":{"responses":{"200":{"description":"","content":{"application/json":{"example":{"Documents":[{"DocumentId":"f3875dae-5fe3-4ed7-a16f-c4ccb9871645","DocumentProfileId":"tradeshift.order.1.0"}]},"schema":{"type":"object","properties":{"DocumentType":{"type":"string"},"UBLVersionID":{"required":["value"],"type":"object","properties":{"value":{"type":"string"}}},"CustomizationID":{"required":["value"],"type":"object","properties":{"value":{"type":"string"}}},"ProfileID":{"required":["value","schemeAgencyID"],"type":"object","properties":{"value":{"type":"string"},"schemeAgencyID":{"type":"string"}}},"ID":{"required":["value"],"type":"object","properties":{"value":{"type":"string"}}},"CreationDate":{"required":["value"],"type":"object","properties":{"value":{"type":"string"}}},"BuyerCustomerParty":{"required":["Party"],"type":"object","properties":{"Party":{"required":["PartyIdentification","PartyName","PostalAddress","Contact"],"type":"object","properties":{"PartyIdentification":{"type":"array","items":{"required":["ID"],"type":"object","properties":{"ID":{"required":["value","schemeID"],"type":"object","properties":{"value":{"type":"string"},"schemeID":{"type":"string"}}}}}},"PartyName":{"type":"array","items":{"required":["Name"],"type":"object","properties":{"Name":{"required":["value"],"type":"object","properties":{"value":{"type":"string"}}}}}},"PostalAddress":{"required":["StreetName"],"type":"object","properties":{"StreetName":{"required":["value"],"type":"object","properties":{"value":{"type":"string"}}}}},"Contact":{"required":["ID","Name","ElectronicMail"],"type":"object","properties":{"ID":{"required":["value","schemeURI"],"type":"object","properties":{"value":{"type":"string"},"schemeURI":{"type":"string"}}},"Name":{"required":["value"],"type":"object","properties":{"value":{"type":"string"}}},"ElectronicMail":{"required":["value"],"type":"object","properties":{"value":{"type":"string"}}}}}}}}},"OriginatorCustomerParty":{"required":["Party"],"type":"object","properties":{"Party":{"type":"object"}}},"Delivery":{"type":"array","items":{"required":["DeliveryAddress"],"type":"object","properties":{"DeliveryAddress":{"required":["StreetName","BuildingName","CityName","PostalZone","CountrySubentity","Country"],"type":"object","properties":{"StreetName":{"required":["value"],"type":"object","properties":{"value":{"type":"string"}}},"BuildingName":{"required":["value"],"type":"object","properties":{"value":{"type":"string"}}},"CityName":{"required":["value"],"type":"object","properties":{"value":{"type":"string"}}},"PostalZone":{"required":["value"],"type":"object","properties":{"value":{"type":"string"}}},"CountrySubentity":{"required":["value"],"type":"object","properties":{"value":{"type":"string"}}},"Country":{"required":["IdentificationCode"],"type":"object","properties":{"IdentificationCode":{"required":["value"],"type":"object","properties":{"value":{"type":"string"}}}}}}},"DeliveryParty":{"required":["PartyName","PartyTaxScheme"],"type":"object","properties":{"PartyIdentification":{"required":["ID"],"type":"object","properties":{"ID":{"required":["value"],"type":"object","properties":{"value":{"type":"string"}}}}},"PartyName":{"required":["Name"],"type":"object","properties":{"Name":{"required":["value"],"type":"object","properties":{"value":{"type":"string"}}}}},"PartyTaxScheme":{"required":["Id"],"type":"object","properties":{"TaxScheme":{"required":["value"],"type":"object","properties":{"value":{"type":"string"}}}}}}},"Despatch":{"type":"object","properties":{"DespatchAddress":{"required":["StreetName","BuildingName","CityName","PostalZone","CountrySubentity","Country"],"type":"object","properties":{"StreetName":{"required":["value"],"type":"object","properties":{"value":{"type":"string"}}},"BuildingName":{"required":["value"],"type":"object","properties":{"value":{"type":"string"}}},"CityName":{"required":["value"],"type":"object","properties":{"value":{"type":"string"}}},"PostalZone":{"required":["value"],"type":"object","properties":{"value":{"type":"string"}}},"CountrySubentity":{"required":["value"],"type":"object","properties":{"value":{"type":"string"}}},"Country":{"required":["IdentificationCode"],"type":"object","properties":{"IdentificationCode":{"required":["value"],"type":"object","properties":{"value":{"type":"string"}}}}}}},"DespatchParty":{"required":["PartyName","PartyTaxScheme"],"type":"object","properties":{"PartyIdentification":{"required":["ID"],"type":"object","properties":{"ID":{"required":["value"],"type":"object","properties":{"value":{"type":"string"}}}}},"PartyName":{"required":["Name"],"type":"object","properties":{"Name":{"required":["value"],"type":"object","properties":{"value":{"type":"string"}}}}},"PartyTaxScheme":{"required":["Id"],"type":"object","properties":{"TaxScheme":{"required":["value"],"type":"object","properties":{"value":{"type":"string"}}}}}}}}}}}},"AnticipatedMonetaryTotal":{"required":["PayableAmount"],"type":"object","properties":{"PayableAmount":{"required":["value","currencyID"],"type":"object","properties":{"value":{"type":"integer"},"currencyID":{"type":"string"}}}}}},"required":["DocumentType","Delivery"]}}}},"423":{"description":"The document is in locked state and order has been spawned from the given requisition."}},"description":"Spawn purchase orders based upon the received spawning command","operationId":"post-rest-external-documents-requisitions-spawn","requestBody":{"content":{"application/json":{"example":{"DocumentId":"2b962986-7788-409e-b0ed-dfff61193b19","Orders":[{"isSpawned":false,"DocumentId":"65ef21fc-99e0-44b1-9c6e-214514d6b161","Lines":[{"value":"1"}],"DocumentProfile":"tradeshift.order.1.0"}]},"schema":{"required":["DocumentId"],"type":"object","additionalProperties":true,"properties":{"DocumentId":{"pattern":"^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$","description":"String representation of an Universally unique identifier (UUID), version 5. See RFC 4122","type":"string"},"Orders":{"type":"array","items":{"type":"object","properties":{"DocumentId":{"pattern":"^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$","description":"String representation of an Universally unique identifier (UUID), version 5. See RFC 4122","type":"string"},"isSpawned":{"type":"boolean"},"DocumentProfile":{"type":"string"},"Lines":{"type":"array","items":{"type":"object","properties":{"value":{"type":"string"}},"required":["value"]}}},"required":["DocumentId","isSpawned","DocumentProfile","Lines"]}}}}}},"required":true},"x-annotation-dx-category":"documents-requisitions","summary":"spawn requisition","tags":["dx-category--documents-requisitions"]}},"/rest/external/documents/requisitions/template":{"get":{"responses":{"200":{"description":"","content":{"application/vnd.oasis.ubl+json":{"schema":{"example":{"_B":"urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2","_S":"urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2","_D":"http://tradeshift.com/api/public/1.0","Requisition":[{"ID":[{"IdentifierContent":"bac9a69c-ec35-4a12-a455-9fb57c24dbfb"}],"Note":[{"TextContent":"I want to request a purchase"}],"OrderDocumentReference":[{"ID":[{"IdentifierContent":"order-01"}]},{"ID":[{"IdentifierContent":"order-02"}]}],"OriginatorCustomerParty":[{"Party":[{"Contact":[{"ID":[{"IdentificationSchemeUniformResourceIdentifier":"http://tradeshift.com/api/1.0/userId","IdentifierContent":"UUID"}],"ElectronicMail":[{"TextContent":"john@johnsson.se"}]}]}]}],"Delivery":[{"DeliveryLocation":[{"Address":[{"ID":[{"IdentificationSchemeIdentifier":"GLN","IdentificationSchemeAgencyIdentifier":"9","IdentifierContent":"1234567890123"}],"Postbox":[{"TextContent":"123"}],"StreetName":[{"TextContent":"Rådhusgatan"}],"AdditionalStreetName":[{"TextContent":"2nd floor"}],"BuildingNumber":[{"TextContent":"5"}],"Department":[{"TextContent":"Purchasing departmen"}],"CityName":[{"TextContent":"Stockholm"}],"PostalZone":[{"TextContent":"11000"}],"Region":[{"TextContent":"RegionX"}],"Country":[{"IdentificationCode":[{"CodeContent":"SE"}]}]}]}]}],"AnticipatedMonetaryTotal":[{"PayableAmount":[{"AmountCurrencyIdentifier":"USD","AmountContent":2108}]}],"RequisitionLine":[{"RequisitionPurposeCode":[{"CodeListIdentifier":"urn:tradeshift.com:api:1.0:requisitionlinepurposecode","CodeContent":"BLANKET_PURCHASE_ORDER"}],"SupplierSharedPrice":[{"PriceAmount":[{"AmountCurrencyIdentifier":"USD","AmountContent":100}]}],"LineItem":[{"ID":[{"IdentifierContent":"1"}],"Note":[{"TextContent":"Freetext note on line 1"}],"Quantity":[{"QuantityUnitCode":"EA","QuantityContent":1}],"LineExtensionAmount":[{"AmountCurrencyIdentifier":"USD","AmountContent":1200}],"AccountingCostCode":[{"CodeContent":"ProjectID123"}],"Price":[{"PriceAmount":[{"AmountCurrencyIdentifier":"USD","AmountContent":1200}],"BaseQuantity":[{"QuantityUnitCode":"EA","QuantityContent":1}],"ValidityPeriod":[{"StartDate":[{"DateContent":"1977-05-15"}]},{"EndDate":[{"DateContent":"1977-05-15"}]}]}],"Item":[{"Description":[{"TextContent":"I want a brown sofa"}],"SellersItemIdentification":[{"IssuerParty":[{"PartyIdentification":[{"ID":[{"IdentifierContent":"444666777"}]}],"PartyName":[{"Name":[{"TextContent":"Sofastore"}]}]}]}],"CommodityClassification":[{"ItemClassificationCode":[{"CodeListIdentifier":"UNSPSC","CodeListAgencyIdentifier":"113","CodeContent":"56101502"}]}]}]}],"DocumentReference":[{"ID":[{"IdentifierContent":"order-01"}]}]}],"UBLVersionID":[{"IdentifierContent":"2.0"}],"CustomizationID":[{"IdentifierContent":"urn:tradeshift.com:ubl-2.0-customizations:2010-06"}],"ProfileID":[{"IdentificationSchemeIdentifier":"CWA 16073:2010","IdentificationSchemeAgencyIdentifier":"1","IdentificationSchemeAgencyNameText":"CEN/ISSS WS/BII","IdentifierContent":"urn:www.cenbii.eu:profile:bii04:ver1.0"}],"CreationDate":[{"DateContent":"1977-05-15"}],"CreationTime":[{"TimeContent":"1977-05-15"}],"BuyerCustomerParty":[{"Party":[{"PartyIdentification":[{"ID":[{"IdentificationSchemeIdentifier":"TS:ID","IdentifierContent":"79eec713-cd84-4a4d-86b5-e35527ef3b3b"}]}],"PartyName":[{"Name":[{"TextContent":"Zurich"}]}],"Contact":[{"ID":[{"IdentificationSchemeUniformResourceIdentifier":"http://tradeshift.com/api/1.0/userId","IdentifierContent":"UUID"}],"ElectronicMail":[{"TextContent":"pelle@johnsson.se"}]}]}]}]}]}}}}}},"description":"Get a requisition template.","operationId":"get-rest-external-documents-requisitions-template","x-annotation-dx-category":"documents-requisitions","summary":"requisition by template","tags":["dx-category--documents-requisitions"]}},"/rest/external/documents/requisitions/{documentId}/RequisitionLine":{"parameters":[{"name":"documentId","in":"path","required":true,"schema":{"type":"string"},"description":"Document UUID identifier"}],"post":{"responses":{"201":{"description":"","content":{"application/vnd.oasis.ubl+json":{"schema":{"example":{"_B":"urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2","_S":"urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2","_D":"http://tradeshift.com/api/public/1.0","Requisition":[{"ID":[{"IdentifierContent":"bac9a69c-ec35-4a12-a455-9fb57c24dbfb"}],"Note":[{"TextContent":"I want to request a purchase"}],"OrderDocumentReference":[{"ID":[{"IdentifierContent":"order-01"}]},{"ID":[{"IdentifierContent":"order-02"}]}],"OriginatorCustomerParty":[{"Party":[{"Contact":[{"ID":[{"IdentificationSchemeUniformResourceIdentifier":"http://tradeshift.com/api/1.0/userId","IdentifierContent":"UUID"}],"ElectronicMail":[{"TextContent":"john@johnsson.se"}]}]}]}],"Delivery":[{"DeliveryLocation":[{"Address":[{"ID":[{"IdentificationSchemeIdentifier":"GLN","IdentificationSchemeAgencyIdentifier":"9","IdentifierContent":"1234567890123"}],"Postbox":[{"TextContent":"123"}],"StreetName":[{"TextContent":"Rådhusgatan"}],"AdditionalStreetName":[{"TextContent":"2nd floor"}],"BuildingNumber":[{"TextContent":"5"}],"Department":[{"TextContent":"Purchasing departmen"}],"CityName":[{"TextContent":"Stockholm"}],"PostalZone":[{"TextContent":"11000"}],"Region":[{"TextContent":"RegionX"}],"Country":[{"IdentificationCode":[{"CodeContent":"SE"}]}]}]}]}],"AnticipatedMonetaryTotal":[{"PayableAmount":[{"AmountCurrencyIdentifier":"USD","AmountContent":2108}]}],"RequisitionLine":[{"RequisitionPurposeCode":[{"CodeListIdentifier":"urn:tradeshift.com:api:1.0:requisitionlinepurposecode","CodeContent":"BLANKET_PURCHASE_ORDER"}],"SupplierSharedPrice":[{"PriceAmount":[{"AmountCurrencyIdentifier":"USD","AmountContent":100}]}],"LineItem":[{"ID":[{"IdentifierContent":"1"}],"Note":[{"TextContent":"Freetext note on line 1"}],"Quantity":[{"QuantityUnitCode":"EA","QuantityContent":1}],"LineExtensionAmount":[{"AmountCurrencyIdentifier":"USD","AmountContent":1200}],"AccountingCostCode":[{"CodeContent":"ProjectID123"}],"Price":[{"PriceAmount":[{"AmountCurrencyIdentifier":"USD","AmountContent":1200}],"BaseQuantity":[{"QuantityUnitCode":"EA","QuantityContent":1}],"ValidityPeriod":[{"StartDate":[{"DateContent":"1977-05-15"}]},{"EndDate":[{"DateContent":"1977-05-15"}]}]}],"Item":[{"Description":[{"TextContent":"I want a brown sofa"}],"SellersItemIdentification":[{"IssuerParty":[{"PartyIdentification":[{"ID":[{"IdentifierContent":"444666777"}]}],"PartyName":[{"Name":[{"TextContent":"Sofastore"}]}]}]}],"CommodityClassification":[{"ItemClassificationCode":[{"CodeListIdentifier":"UNSPSC","CodeListAgencyIdentifier":"113","CodeContent":"56101502"}]}]}]}],"DocumentReference":[{"ID":[{"IdentifierContent":"order-01"}]}]}],"UBLVersionID":[{"IdentifierContent":"2.0"}],"CustomizationID":[{"IdentifierContent":"urn:tradeshift.com:ubl-2.0-customizations:2010-06"}],"ProfileID":[{"IdentificationSchemeIdentifier":"CWA 16073:2010","IdentificationSchemeAgencyIdentifier":"1","IdentificationSchemeAgencyNameText":"CEN/ISSS WS/BII","IdentifierContent":"urn:www.cenbii.eu:profile:bii04:ver1.0"}],"CreationDate":[{"DateContent":"1977-05-15"}],"CreationTime":[{"TimeContent":"1977-05-15"}],"BuyerCustomerParty":[{"Party":[{"PartyIdentification":[{"ID":[{"IdentificationSchemeIdentifier":"TS:ID","IdentifierContent":"79eec713-cd84-4a4d-86b5-e35527ef3b3b"}]}],"PartyName":[{"Name":[{"TextContent":"Zurich"}]}],"Contact":[{"ID":[{"IdentificationSchemeUniformResourceIdentifier":"http://tradeshift.com/api/1.0/userId","IdentifierContent":"UUID"}],"ElectronicMail":[{"TextContent":"pelle@johnsson.se"}]}]}]}]}]}}}}}},"description":"Create a new Requisition from the requisition template containing the provided line and using the provided id\n","operationId":"post-rest-external-documents-requisitions-documentid-requisitionline","requestBody":{"content":{"application/vnd.oasis.ubl+json":{"example":{"_B":"urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2","_S":"urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2","_D":"http://tradeshift.com/api/public/1.0","RequisitionLine":[{"RequisitionPurposeCode":[{"CodeListIdentifier":"urn:tradeshift.com:api:1.0:requisitionlinepurposecode","CodeContent":"BLANKET_PURCHASE_ORDER"}],"SupplierSharedPrice":[{"PriceAmount":[{"AmountCurrencyIdentifier":"USD","AmountContent":100}]}],"LineItem":[{"ID":[{"IdentifierContent":"1"}],"Note":[{"TextContent":"Freetext note on line 1"}],"Quantity":[{"QuantityUnitCode":"EA","QuantityContent":1}],"LineExtensionAmount":[{"AmountCurrencyIdentifier":"USD","AmountContent":1200}],"AccountingCostCode":[{"CodeContent":"ProjectID123"}],"Price":[{"PriceAmount":[{"AmountCurrencyIdentifier":"USD","AmountContent":1200}],"BaseQuantity":[{"QuantityUnitCode":"EA","QuantityContent":1}],"ValidityPeriod":[{"StartDate":[{"DateContent":"1977-05-15"}]},{"EndDate":[{"DateContent":"1977-05-15"}]}]}],"Item":[{"Description":[{"TextContent":"I want a brown sofa"}],"SellersItemIdentification":[{"IssuerParty":[{"PartyIdentification":[{"ID":[{"IdentifierContent":"444666777"}]}],"PartyName":[{"Name":[{"TextContent":"Sofastore"}]}]}]}],"CommodityClassification":[{"ItemClassificationCode":[{"CodeListIdentifier":"UNSPSC","CodeListAgencyIdentifier":"113","CodeContent":"56101502"}]}]}]}],"DocumentReference":[{"ID":[{"IdentifierContent":"order-01"}]}]}]},"schema":{"type":"string"}}},"required":true},"x-annotation-dx-category":"documents-requisitions","summary":"create requisition line","tags":["dx-category--documents-requisitions"]}},"/rest/external/documents/requisitions/{documentId}/RequisitionLines":{"parameters":[{"name":"documentId","in":"path","required":true,"schema":{"type":"string"},"description":"Document UUID identifier"}],"post":{"responses":{"201":{"description":"","content":{"application/vnd.oasis.ubl+json":{"schema":{"example":{"_B":"urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2","_S":"urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2","_D":"http://tradeshift.com/api/public/1.0","RequisitionLine":[{"RequisitionPurposeCode":[{"CodeListIdentifier":"urn:tradeshift.com:api:1.0:requisitionlinepurposecode","CodeContent":"BLANKET_PURCHASE_ORDER"}],"SupplierSharedPrice":[{"PriceAmount":[{"AmountCurrencyIdentifier":"USD","AmountContent":100}]}],"LineItem":[{"ID":[{"IdentifierContent":"1"}],"Note":[{"TextContent":"Freetext note on line 1"}],"Quantity":[{"QuantityUnitCode":"EA","QuantityContent":1}],"LineExtensionAmount":[{"AmountCurrencyIdentifier":"USD","AmountContent":1200}],"AccountingCostCode":[{"CodeContent":"ProjectID123"}],"Price":[{"PriceAmount":[{"AmountCurrencyIdentifier":"USD","AmountContent":1200}],"BaseQuantity":[{"QuantityUnitCode":"EA","QuantityContent":1}],"ValidityPeriod":[{"StartDate":[{"DateContent":"1977-05-15"}]},{"EndDate":[{"DateContent":"1977-05-15"}]}]}],"Item":[{"Description":[{"TextContent":"I want a brown sofa"}],"SellersItemIdentification":[{"IssuerParty":[{"PartyIdentification":[{"ID":[{"IdentifierContent":"444666777"}]}],"PartyName":[{"Name":[{"TextContent":"Sofastore"}]}]}]}],"CommodityClassification":[{"ItemClassificationCode":[{"CodeListIdentifier":"UNSPSC","CodeListAgencyIdentifier":"113","CodeContent":"56101502"}]}]}]}],"DocumentReference":[{"ID":[{"IdentifierContent":"order-01"}]}]}]}}}}},"404":{"description":""}},"description":"Add a line to the Requisition","operationId":"post-rest-external-documents-requisitions-documentid-requisitionlines","requestBody":{"content":{"application/vnd.oasis.ubl+json":{"example":{"_B":"urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2","_S":"urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2","_D":"http://tradeshift.com/api/public/1.0","RequisitionLine":[{"RequisitionPurposeCode":[{"CodeListIdentifier":"urn:tradeshift.com:api:1.0:requisitionlinepurposecode","CodeContent":"BLANKET_PURCHASE_ORDER"}],"SupplierSharedPrice":[{"PriceAmount":[{"AmountCurrencyIdentifier":"USD","AmountContent":100}]}],"LineItem":[{"ID":[{"IdentifierContent":"1"}],"Note":[{"TextContent":"Freetext note on line 1"}],"Quantity":[{"QuantityUnitCode":"EA","QuantityContent":1}],"LineExtensionAmount":[{"AmountCurrencyIdentifier":"USD","AmountContent":1200}],"AccountingCostCode":[{"CodeContent":"ProjectID123"}],"Price":[{"PriceAmount":[{"AmountCurrencyIdentifier":"USD","AmountContent":1200}],"BaseQuantity":[{"QuantityUnitCode":"EA","QuantityContent":1}],"ValidityPeriod":[{"StartDate":[{"DateContent":"1977-05-15"}]},{"EndDate":[{"DateContent":"1977-05-15"}]}]}],"Item":[{"Description":[{"TextContent":"I want a brown sofa"}],"SellersItemIdentification":[{"IssuerParty":[{"PartyIdentification":[{"ID":[{"IdentifierContent":"444666777"}]}],"PartyName":[{"Name":[{"TextContent":"Sofastore"}]}]}]}],"CommodityClassification":[{"ItemClassificationCode":[{"CodeListIdentifier":"UNSPSC","CodeListAgencyIdentifier":"113","CodeContent":"56101502"}]}]}]}],"DocumentReference":[{"ID":[{"IdentifierContent":"order-01"}]}]}]},"schema":{"type":"string"}}},"required":true},"x-annotation-dx-category":"documents-requisitions","summary":"update requisition lines","tags":["dx-category--documents-requisitions"]}},"/rest/external/documents/requisitions/{documentId}/RequisitionLines/{lineId}":{"parameters":[{"name":"lineId","in":"path","required":true,"schema":{"type":"string"},"description":"Line UUID identifier"},{"name":"documentId","in":"path","required":true,"schema":{"type":"string"},"description":"Document UUID identifier"}],"get":{"responses":{"200":{"description":"","content":{"application/vnd.oasis.ubl+json":{"schema":{"example":{"_B":"urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2","_S":"urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2","_D":"http://tradeshift.com/api/public/1.0","RequisitionLine":[{"RequisitionPurposeCode":[{"CodeListIdentifier":"urn:tradeshift.com:api:1.0:requisitionlinepurposecode","CodeContent":"BLANKET_PURCHASE_ORDER"}],"SupplierSharedPrice":[{"PriceAmount":[{"AmountCurrencyIdentifier":"USD","AmountContent":100}]}],"LineItem":[{"ID":[{"IdentifierContent":"1"}],"Note":[{"TextContent":"Freetext note on line 1"}],"Quantity":[{"QuantityUnitCode":"EA","QuantityContent":1}],"LineExtensionAmount":[{"AmountCurrencyIdentifier":"USD","AmountContent":1200}],"AccountingCostCode":[{"CodeContent":"ProjectID123"}],"Price":[{"PriceAmount":[{"AmountCurrencyIdentifier":"USD","AmountContent":1200}],"BaseQuantity":[{"QuantityUnitCode":"EA","QuantityContent":1}],"ValidityPeriod":[{"StartDate":[{"DateContent":"1977-05-15"}]},{"EndDate":[{"DateContent":"1977-05-15"}]}]}],"Item":[{"Description":[{"TextContent":"I want a brown sofa"}],"SellersItemIdentification":[{"IssuerParty":[{"PartyIdentification":[{"ID":[{"IdentifierContent":"444666777"}]}],"PartyName":[{"Name":[{"TextContent":"Sofastore"}]}]}]}],"CommodityClassification":[{"ItemClassificationCode":[{"CodeListIdentifier":"UNSPSC","CodeListAgencyIdentifier":"113","CodeContent":"56101502"}]}]}]}],"DocumentReference":[{"ID":[{"IdentifierContent":"order-01"}]}]}]}}}}},"404":{"description":""}},"description":"Retrieve a specific Line from a Requisition","operationId":"get-rest-external-documents-requisitions-documentid-requisitionlines-lineid","x-annotation-dx-category":"documents-requisitions","summary":"get requisition line","tags":["dx-category--documents-requisitions"]},"put":{"responses":{"200":{"description":"","content":{"application/vnd.oasis.ubl+json":{"schema":{"example":{"_B":"urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2","_S":"urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2","_D":"http://tradeshift.com/api/public/1.0","RequisitionLine":[{"RequisitionPurposeCode":[{"CodeListIdentifier":"urn:tradeshift.com:api:1.0:requisitionlinepurposecode","CodeContent":"BLANKET_PURCHASE_ORDER"}],"SupplierSharedPrice":[{"PriceAmount":[{"AmountCurrencyIdentifier":"USD","AmountContent":100}]}],"LineItem":[{"ID":[{"IdentifierContent":"1"}],"Note":[{"TextContent":"Freetext note on line 1"}],"Quantity":[{"QuantityUnitCode":"EA","QuantityContent":1}],"LineExtensionAmount":[{"AmountCurrencyIdentifier":"USD","AmountContent":1200}],"AccountingCostCode":[{"CodeContent":"ProjectID123"}],"Price":[{"PriceAmount":[{"AmountCurrencyIdentifier":"USD","AmountContent":1200}],"BaseQuantity":[{"QuantityUnitCode":"EA","QuantityContent":1}],"ValidityPeriod":[{"StartDate":[{"DateContent":"1977-05-15"}]},{"EndDate":[{"DateContent":"1977-05-15"}]}]}],"Item":[{"Description":[{"TextContent":"I want a brown sofa"}],"SellersItemIdentification":[{"IssuerParty":[{"PartyIdentification":[{"ID":[{"IdentifierContent":"444666777"}]}],"PartyName":[{"Name":[{"TextContent":"Sofastore"}]}]}]}],"CommodityClassification":[{"ItemClassificationCode":[{"CodeListIdentifier":"UNSPSC","CodeListAgencyIdentifier":"113","CodeContent":"56101502"}]}]}]}],"DocumentReference":[{"ID":[{"IdentifierContent":"order-01"}]}]}]}}}}},"404":{"description":""}},"description":"Update a specific Line of the Requisition","operationId":"put-rest-external-documents-requisitions-documentid-requisitionlines-lineid","requestBody":{"content":{"application/vnd.oasis.ubl+json":{"example":{"_B":"urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2","_S":"urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2","_D":"http://tradeshift.com/api/public/1.0","RequisitionLine":[{"RequisitionPurposeCode":[{"CodeListIdentifier":"urn:tradeshift.com:api:1.0:requisitionlinepurposecode","CodeContent":"BLANKET_PURCHASE_ORDER"}],"SupplierSharedPrice":[{"PriceAmount":[{"AmountCurrencyIdentifier":"USD","AmountContent":100}]}],"LineItem":[{"ID":[{"IdentifierContent":"1"}],"Note":[{"TextContent":"Freetext note on line 1"}],"Quantity":[{"QuantityUnitCode":"EA","QuantityContent":1}],"LineExtensionAmount":[{"AmountCurrencyIdentifier":"USD","AmountContent":1200}],"AccountingCostCode":[{"CodeContent":"ProjectID123"}],"Price":[{"PriceAmount":[{"AmountCurrencyIdentifier":"USD","AmountContent":1200}],"BaseQuantity":[{"QuantityUnitCode":"EA","QuantityContent":1}],"ValidityPeriod":[{"StartDate":[{"DateContent":"1977-05-15"}]},{"EndDate":[{"DateContent":"1977-05-15"}]}]}],"Item":[{"Description":[{"TextContent":"I want a brown sofa"}],"SellersItemIdentification":[{"IssuerParty":[{"PartyIdentification":[{"ID":[{"IdentifierContent":"444666777"}]}],"PartyName":[{"Name":[{"TextContent":"Sofastore"}]}]}]}],"CommodityClassification":[{"ItemClassificationCode":[{"CodeListIdentifier":"UNSPSC","CodeListAgencyIdentifier":"113","CodeContent":"56101502"}]}]}]}],"DocumentReference":[{"ID":[{"IdentifierContent":"order-01"}]}]}]},"schema":{"type":"string"}}},"required":true},"x-annotation-dx-category":"documents-requisitions","summary":"update requisition line","tags":["dx-category--documents-requisitions"]},"delete":{"responses":{"204":{"description":""},"404":{"description":""}},"description":"Remove a specific Line of the Requisition","operationId":"delete-rest-external-documents-requisitions-documentid-requisitionlines-lineid","x-annotation-dx-category":"documents-requisitions","summary":"remove requisition line","tags":["dx-category--documents-requisitions"]}},"/rest/external/documents/requisitions/{documentId}/state":{"parameters":[{"name":"documentId","in":"path","required":true,"schema":{"type":"string"},"description":"Document UUID identifier"}],"put":{"responses":{"204":{"description":""}},"description":"Set the state for the requisition document","operationId":"put-rest-external-documents-requisitions-documentid-state","requestBody":{"content":{"application/json":{"example":{"NewState":"REJECTED"},"schema":{"required":["NewState"],"type":"object","properties":{"NewState":{"type":"string"}}}}},"required":true},"x-annotation-dx-category":"documents-requisitions","summary":"update requisition state","tags":["dx-category--documents-requisitions"]}},"/rest/external/documents/validate":{"post":{"responses":{"204":{"description":"The document content was validated successfully and no errors were found."},"400":{"description":"The document content was validated and some errors were found.","content":{"text/xml":{"schema":{"example":"<ResponseError xmlns=\"http://tradeshift.com/api/1.0\">\n    <ErrorCode>BadRequest</ErrorCode>\n    <Message>An invalid request was made - Unable to find quote by given id: 34a35606-626a-5f13-b920-72b21c189ffa</Message>\n    <ErrorDetail>\n        <Key>message</Key>\n        <Value>Unable to find quote by given id: 34a35606-626a-5f13-b920-72b21c189ffa</Value>\n    </ErrorDetail>\n</ResponseError>\n"}}}},"412":{"description":"No active connection exists between the client and the specified company."}},"description":"This resource validates a given UBL document content by using a combined document profile made of the sender's default document\nprofile using documentProfileId (e.g. \"tradeshift.invoice.ubl.1.0\") and the document profile set between the sender and the receiver.\nThis can be used before dispatching a document in order to verify if it has profile related errors or not. If the \"receiverCompanyId\"\nparameter is not specified then the validation will be done using only the sender \"documentProfileId\". If the \"receiverCompanyId\" parameter\nis specified, then the resource can validate documents only if an active connection exists between the client and that company. If no such\nconnectin is found, then a 412 Precondition Failed Exception is returned. If the client has an invalid document then a list of validation\nerrors will be provided alongside 400 Bad Request response status code.\n","operationId":"post-rest-external-documents-validate","requestBody":{"content":{"application/json":{"example":{"DocumentType":"InvoiceType","UBLVersionID":{"value":"2.0"},"CustomizationID":{"value":"urn:tradeshift.com:ubl-2.0-customizations:2010-06"},"ProfileID":{"value":"urn:www.cenbii.eu:profile:bii04:ver1.0","schemeID":"CWA 16073:2010","schemeAgencyID":"CEN/ISSS WS/BII","schemeVersionID":"1"},"ID":{"value":"1008"},"IssueDate":{"value":"2017-12-05"},"InvoiceTypeCode":{"value":"380","listID":"UN/ECE 1001 Subset","listAgencyID":"6","listVersionID":"D08B"},"DocumentCurrencyCode":{"value":"USD"},"OrderReference":{"ID":{"value":"1223232324"}},"OriginatorDocumentReference":[{"ID":{"value":"0351a12e-d8dd-11e7-9296-cec278b6b50a"}}],"AdditionalDocumentReference":[{"ID":{"value":"HALF_EVEN"},"DocumentTypeCode":{"value":"RoundingRule","listID":"urn:tradeshift.com:api:1.0:documenttypecode"}}],"AccountingSupplierParty":{"Party":{"PartyIdentification":[{"ID":{"value":"f8fa779a-8d84-425e-b99f-dd756924b0bd","schemeID":"TS:ID"}}],"PartyName":[{"Name":{"value":"Supplier UK"}}],"PostalAddress":{"AddressFormatCode":{"value":"5","listID":"UN/ECE 3477","listAgencyID":"6","listVersionID":"D08B"},"StreetName":{"value":"Joakimsgade"},"AdditionalStreetName":{"value":"Brown locality"},"BuildingNumber":{"value":"2"},"CityName":{"value":"Tradeshiftino"},"PostalZone":{"value":"3344"},"Country":{"IdentificationCode":{"value":"GB"}}},"Contact":{"ID":{"value":"0f3a79e2-fa22-4f81-b084-5fedbaaa1982","schemeURI":"http://tradeshift.com/api/1.0/userId"},"Name":{"value":"Zach Andersson"}},"Person":{"FirstName":{"value":"Zach"},"FamilyName":{"value":"Andersson"}}}},"AccountingCustomerParty":{"Party":{"PartyIdentification":[{"ID":{"value":"c0c17d58-9e31-4e79-a204-b3833116bc4d","schemeID":"TS:ID"}}],"PartyName":[{"Name":{"value":"ChildBranchUS"}}],"PostalAddress":{"AddressFormatCode":{"value":"5","listID":"UN/ECE 3477","listAgencyID":"6","listVersionID":"D08B"},"StreetName":{"value":"Andersgade"},"BuildingNumber":{"value":"4"},"CityName":{"value":"Tradeshiftograd"},"PostalZone":{"value":"55667"},"CountrySubentity":{"value":"VW"},"Country":{"IdentificationCode":{"value":"US"}}},"Contact":{}}},"Delivery":[{}],"TaxTotal":[{"TaxAmount":{"value":0.84,"currencyID":"USD"},"TaxSubtotal":[{"TaxableAmount":{"value":11,"currencyID":"USD"},"TaxAmount":{"value":0.84,"currencyID":"USD"},"TaxCategory":{"ID":{"value":"S","schemeID":"UN/ECE 5305","schemeAgencyID":"6","schemeVersionID":"D08B"},"Percent":{"value":7.6},"TaxScheme":{"ID":{"value":"STT","schemeID":"UN/ECE 5153 Subset","schemeAgencyID":"6","schemeVersionID":"D08B"},"Name":{"value":"US Tax 7.6%"},"TaxTypeCode":{"value":"K99","listAgencyName":"DHL"}}}}]}],"LegalMonetaryTotal":{"LineExtensionAmount":{"value":11,"currencyID":"USD"},"TaxExclusiveAmount":{"value":0.84,"currencyID":"USD"},"TaxInclusiveAmount":{"value":11.84,"currencyID":"USD"},"PayableAmount":{"value":11.84,"currencyID":"USD"}},"InvoiceLine":[{"ID":{"value":"1"},"InvoicedQuantity":{"value":1,"unitCode":"EA"},"LineExtensionAmount":{"value":11,"currencyID":"USD"},"OrderLineReference":[{"LineID":{"value":"1"},"OrderReference":{"ID":{"value":"1223232324"}}}],"TaxTotal":[{"TaxAmount":{"value":0.84,"currencyID":"USD"},"TaxSubtotal":[{"TaxableAmount":{"value":11,"currencyID":"USD"},"TaxAmount":{"value":0.84,"currencyID":"USD"},"CalculationSequenceNumeric":{"value":1},"TaxCategory":{"ID":{"value":"S","schemeID":"UN/ECE 5305","schemeAgencyID":"6","schemeVersionID":"D08B"},"Percent":{"value":7.6},"TaxScheme":{"ID":{"value":"STT","schemeID":"UN/ECE 5153 Subset","schemeAgencyID":"6","schemeVersionID":"D08B"},"Name":{"value":"US Tax 7.6%"},"TaxTypeCode":{"value":"K9","listAgencyName":"DHL"}}}}]}],"Item":{"Description":[{"value":"A good description..."}],"Name":{"value":"A good name..."},"SellersItemIdentification":{"ID":{"value":"1","schemeID":"GTIN","schemeAgencyID":"9"}}},"Price":{"PriceAmount":{"value":11,"currencyID":"USD"},"BaseQuantity":{"value":1,"unitCode":"EA"},"OrderableUnitFactorRate":{"value":1}}}]},"schema":{"type":"string"}}},"required":true},"parameters":[{"name":"Accept","in":"header","required":true,"description":"The MIME media type of the response content. Example: text/plain\n","schema":{"default":"text/plain","type":"string"}},{"name":"Content-Type","in":"header","required":true,"description":"The MIME media type of the request content. Example: text/xml\n","schema":{"default":"text/xml","type":"string"}},{"name":"documentProfileId","in":"query","required":true,"description":"Document profile used for validating the document.","schema":{"type":"string"}},{"name":"receiverCompanyId","in":"query","description":"The receiver company id whose document profile will be used for validation.","schema":{"type":"string"}}],"x-annotation-dx-category":"documents-document","summary":"validate a document","tags":["dx-category--documents-document"]}},"/rest/external/documents/{documentId}":{"parameters":[{"name":"documentId","in":"path","required":true,"schema":{"type":"string"},"description":"Document UUID identifier"}],"get":{"responses":{"200":{"description":"The requested document in the desired format.","headers":{"X-Tradeshift-SecurityGroup":{"schema":{"type":"string"}}},"content":{"application/json":{"example":{"DocumentType":"Requisition","UBLVersionID":{"value":"2.0"},"CustomizationID":{"value":"urn:tradeshift.com:ubl-2.0-customizations:2010-06"},"ProfileID":{"value":"urn:tradeshift.com:profile:Requisition:ver1.0","schemeAgencyID":"http://tradeshift.com"},"ID":{"value":"51"},"CreationDate":{"value":"2016-09-08T14:09:33.098+02:00"},"BuyerCustomerParty":{"Party":{"PartyIdentification":[{"ID":{"value":"7d583074-f6e0-446c-896b-0dfa0789d891","schemeID":"TS:ID"}}],"PartyName":[{"Name":{"value":"Test Buyer"}}],"PostalAddress":{"StreetName":{"value":"The Old Warehouse Michael Rd SW6 2AD London Great Britain 2"}},"Contact":{"ID":{"value":"c931be90-9249-47b0-b52b-ae7da808d4cb","schemeURI":"http://tradeshift.com/api/1.0/userId"},"Name":{"value":"Mark Jenson"},"ElectronicMail":{"value":"markjenson@mailinator.com"}}}},"OriginatorCustomerParty":{"Party":{}},"Delivery":[{"DeliveryAddress":{"StreetName":{"value":"10 downing street"},"BuildingName":{"value":"390d9663-64bc-4a92-a31d-76a79c8c04dc"},"CityName":{"value":"London"},"PostalZone":{"value":"12345"},"CountrySubentity":{"value":""},"Country":{"IdentificationCode":{"value":"GB"}}}}],"AnticipatedMonetaryTotal":{"PayableAmount":{"value":0,"currencyID":"GBP"}}},"schema":{"type":"object","properties":{"DocumentType":{"type":"string"},"UBLVersionID":{"required":["value"],"type":"object","properties":{"value":{"type":"string"}}},"CustomizationID":{"required":["value"],"type":"object","properties":{"value":{"type":"string"}}},"ProfileID":{"required":["value","schemeAgencyID"],"type":"object","properties":{"value":{"type":"string"},"schemeAgencyID":{"type":"string"}}},"ID":{"required":["value"],"type":"object","properties":{"value":{"type":"string"}}},"CreationDate":{"required":["value"],"type":"object","properties":{"value":{"type":"string"}}},"BuyerCustomerParty":{"required":["Party"],"type":"object","properties":{"Party":{"required":["PartyIdentification","PartyName","PostalAddress","Contact"],"type":"object","properties":{"PartyIdentification":{"type":"array","items":{"required":["ID"],"type":"object","properties":{"ID":{"required":["value","schemeID"],"type":"object","properties":{"value":{"type":"string"},"schemeID":{"type":"string"}}}}}},"PartyName":{"type":"array","items":{"required":["Name"],"type":"object","properties":{"Name":{"required":["value"],"type":"object","properties":{"value":{"type":"string"}}}}}},"PostalAddress":{"required":["StreetName"],"type":"object","properties":{"StreetName":{"required":["value"],"type":"object","properties":{"value":{"type":"string"}}}}},"Contact":{"required":["ID","Name","ElectronicMail"],"type":"object","properties":{"ID":{"required":["value","schemeURI"],"type":"object","properties":{"value":{"type":"string"},"schemeURI":{"type":"string"}}},"Name":{"required":["value"],"type":"object","properties":{"value":{"type":"string"}}},"ElectronicMail":{"required":["value"],"type":"object","properties":{"value":{"type":"string"}}}}}}}}},"OriginatorCustomerParty":{"required":["Party"],"type":"object","properties":{"Party":{"type":"object"}}},"Delivery":{"type":"array","items":{"required":["DeliveryAddress"],"type":"object","properties":{"DeliveryAddress":{"required":["StreetName","BuildingName","CityName","PostalZone","CountrySubentity","Country"],"type":"object","properties":{"StreetName":{"required":["value"],"type":"object","properties":{"value":{"type":"string"}}},"BuildingName":{"required":["value"],"type":"object","properties":{"value":{"type":"string"}}},"CityName":{"required":["value"],"type":"object","properties":{"value":{"type":"string"}}},"PostalZone":{"required":["value"],"type":"object","properties":{"value":{"type":"string"}}},"CountrySubentity":{"required":["value"],"type":"object","properties":{"value":{"type":"string"}}},"Country":{"required":["IdentificationCode"],"type":"object","properties":{"IdentificationCode":{"required":["value"],"type":"object","properties":{"value":{"type":"string"}}}}}}},"DeliveryParty":{"required":["PartyName","PartyTaxScheme"],"type":"object","properties":{"PartyIdentification":{"required":["ID"],"type":"object","properties":{"ID":{"required":["value"],"type":"object","properties":{"value":{"type":"string"}}}}},"PartyName":{"required":["Name"],"type":"object","properties":{"Name":{"required":["value"],"type":"object","properties":{"value":{"type":"string"}}}}},"PartyTaxScheme":{"required":["Id"],"type":"object","properties":{"TaxScheme":{"required":["value"],"type":"object","properties":{"value":{"type":"string"}}}}}}},"Despatch":{"type":"object","properties":{"DespatchAddress":{"required":["StreetName","BuildingName","CityName","PostalZone","CountrySubentity","Country"],"type":"object","properties":{"StreetName":{"required":["value"],"type":"object","properties":{"value":{"type":"string"}}},"BuildingName":{"required":["value"],"type":"object","properties":{"value":{"type":"string"}}},"CityName":{"required":["value"],"type":"object","properties":{"value":{"type":"string"}}},"PostalZone":{"required":["value"],"type":"object","properties":{"value":{"type":"string"}}},"CountrySubentity":{"required":["value"],"type":"object","properties":{"value":{"type":"string"}}},"Country":{"required":["IdentificationCode"],"type":"object","properties":{"IdentificationCode":{"required":["value"],"type":"object","properties":{"value":{"type":"string"}}}}}}},"DespatchParty":{"required":["PartyName","PartyTaxScheme"],"type":"object","properties":{"PartyIdentification":{"required":["ID"],"type":"object","properties":{"ID":{"required":["value"],"type":"object","properties":{"value":{"type":"string"}}}}},"PartyName":{"required":["Name"],"type":"object","properties":{"Name":{"required":["value"],"type":"object","properties":{"value":{"type":"string"}}}}},"PartyTaxScheme":{"required":["Id"],"type":"object","properties":{"TaxScheme":{"required":["value"],"type":"object","properties":{"value":{"type":"string"}}}}}}}}}}}},"AnticipatedMonetaryTotal":{"required":["PayableAmount"],"type":"object","properties":{"PayableAmount":{"required":["value","currencyID"],"type":"object","properties":{"value":{"type":"integer"},"currencyID":{"type":"string"}}}}}},"required":["DocumentType","Delivery"]}}}},"400":{"description":"Bad Request due to invalid input.","content":{"application/*":{"example":{"ErrorCode":"BadRequest","Message":"Could not resolve type nonExistentType","ErrorDetail":[{"Key":"message","Value":"Could not resolve type nonExistentType"},{"Key":"stacktrace","Value":"com.tradeshift.commons.exception.BadRequestException: Could not resolve type nonExistentType\n\tat com.tradeshift.coding.rest.CodingResource.getCodingLists(CodingResource.java:85)\n\t"}],"ValidationError":[],"RequestId":"2c941598-489c-4fac-8543-03cb921feaf7"},"schema":{"title":"Tradeshift Public API 1.0 - TradeshiftException","required":["ErrorCode","Message","RequestId"],"type":"object","additionalProperties":false,"properties":{"ErrorCode":{"type":"string"},"Message":{"type":"string"},"ErrorDetail":{"type":"array","items":{"type":"object","additionalProperties":false,"properties":{"Key":{"type":"string"},"Value":{"type":"string"}},"required":["Key","Value"]}},"ValidationError":{"type":"array","items":{"type":"object"}},"RequestId":{"pattern":"^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$","description":"String representation of an Universally unique identifier (UUID), version 5. See RFC 4122","type":"string"}}}}}},"401":{"description":"The user was not authorized to perform the operation."},"404":{"description":"Document with the specified id was not found or it is deleted."}},"description":"Returns the document identified by the given UUID, if it exists and is not marked as deleted.\nIf you want to retrieve the deleted documents, use [Find Documents](#get-rest-external-documents) along\nwith stag=deleted parameter and with the corresponding id.\nThe document can be retrieved in a PDF representation or in one of the raw UBL formats\n(XML, JSON or Oasis JSON) depending on the Accept header. The default format is the XML.\n","operationId":"get-rest-external-documents-documentid","parameters":[{"name":"Accept","in":"header","required":true,"description":"The MIME media type of the response content. Example: text/xml, application/json,\napplication/vnd.oasis.ubl+json, application/*\n","schema":{"default":"text/xml","type":"string"}},{"name":"includeDraftAttachments","in":"query","description":"Include attachements in the UBL when the document is in DRAFT state","schema":{"default":false,"type":"boolean"}}],"x-annotation-dx-category":"documents-document","summary":"find document","tags":["dx-category--documents-document"]},"put":{"responses":{"204":{"description":"The document was uploaded successfully."},"400":{"description":"Bad Request due to invalid input.","content":{"application/json":{"example":{"ErrorCode":"BadRequest","Message":"Could not resolve type nonExistentType","ErrorDetail":[{"Key":"message","Value":"Could not resolve type nonExistentType"},{"Key":"stacktrace","Value":"com.tradeshift.commons.exception.BadRequestException: Could not resolve type nonExistentType\n\tat com.tradeshift.coding.rest.CodingResource.getCodingLists(CodingResource.java:85)\n\t"}],"ValidationError":[],"RequestId":"2c941598-489c-4fac-8543-03cb921feaf7"},"schema":{"title":"Tradeshift Public API 1.0 - TradeshiftException","required":["ErrorCode","Message","RequestId"],"type":"object","additionalProperties":false,"properties":{"ErrorCode":{"type":"string"},"Message":{"type":"string"},"ErrorDetail":{"type":"array","items":{"type":"object","additionalProperties":false,"properties":{"Key":{"type":"string"},"Value":{"type":"string"}},"required":["Key","Value"]}},"ValidationError":{"type":"array","items":{"type":"object"}},"RequestId":{"pattern":"^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$","description":"String representation of an Universally unique identifier (UUID), version 5. See RFC 4122","type":"string"}}}}}}},"description":"This resource allows to store a document within the Tradeshift platform. The actual document content is sent\nas the entity/body of the API call. The client can decide on the UUID for the new element defined by the\n\"documentId\" parameter. Saving a document as draft will use the document content as primary source for tradeshift internal\nconversion which will output a new TSUBL content overwriting the initial one. By doing so extra connection checks will occur.\nOtherwise, saving it as a non-draft will not alter the provided UBL document content and will set it as the primary source for the document. In both cases,\nthe uploaded document will show up as editable in the UI. If the cliend decides that the document should not be editable, then it's state can be locked with a PUT request.\nMore details about how to lock a draft document can be found in [Lock a Draft Document](#put-rest-external-documents-documentid-lockedstate-state)\nsection. If a document contains attachments at /AdditionalDocumentReference/Attachment/EmbeddedDocumentBinaryObject path,\nit will be added to the document. If the document already exists, attachments with already used filename will overwrite previous versions.\nAttachments with new file names will be appended to the list of attachments on the document. More details about how to remove document attachments\ncan be found in [Delete Document Attachment](#delete-rest-external-documents-documentid-attachments-name-content) section.\nThis is a generic document API endpoint which covers all document types.\n","operationId":"put-rest-external-documents-documentid","requestBody":{"content":{"application/vnd.oasis.ubl+json":{"example":{"_B":"urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2","_S":"urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2","_D":"http://tradeshift.com/api/public/1.0","Requisition":[{"ID":[{"IdentifierContent":"bac9a69c-ec35-4a12-a455-9fb57c24dbfb"}],"Note":[{"TextContent":"I want to request a purchase"}],"OrderDocumentReference":[{"ID":[{"IdentifierContent":"order-01"}]},{"ID":[{"IdentifierContent":"order-02"}]}],"OriginatorCustomerParty":[{"Party":[{"Contact":[{"ID":[{"IdentificationSchemeUniformResourceIdentifier":"http://tradeshift.com/api/1.0/userId","IdentifierContent":"UUID"}],"ElectronicMail":[{"TextContent":"john@johnsson.se"}]}]}]}],"Delivery":[{"DeliveryLocation":[{"Address":[{"ID":[{"IdentificationSchemeIdentifier":"GLN","IdentificationSchemeAgencyIdentifier":"9","IdentifierContent":"1234567890123"}],"Postbox":[{"TextContent":"123"}],"StreetName":[{"TextContent":"Rådhusgatan"}],"AdditionalStreetName":[{"TextContent":"2nd floor"}],"BuildingNumber":[{"TextContent":"5"}],"Department":[{"TextContent":"Purchasing departmen"}],"CityName":[{"TextContent":"Stockholm"}],"PostalZone":[{"TextContent":"11000"}],"Region":[{"TextContent":"RegionX"}],"Country":[{"IdentificationCode":[{"CodeContent":"SE"}]}]}]}]}],"AnticipatedMonetaryTotal":[{"PayableAmount":[{"AmountCurrencyIdentifier":"USD","AmountContent":2108}]}],"RequisitionLine":[{"RequisitionPurposeCode":[{"CodeListIdentifier":"urn:tradeshift.com:api:1.0:requisitionlinepurposecode","CodeContent":"BLANKET_PURCHASE_ORDER"}],"SupplierSharedPrice":[{"PriceAmount":[{"AmountCurrencyIdentifier":"USD","AmountContent":100}]}],"LineItem":[{"ID":[{"IdentifierContent":"1"}],"Note":[{"TextContent":"Freetext note on line 1"}],"Quantity":[{"QuantityUnitCode":"EA","QuantityContent":1}],"LineExtensionAmount":[{"AmountCurrencyIdentifier":"USD","AmountContent":1200}],"AccountingCostCode":[{"CodeContent":"ProjectID123"}],"Price":[{"PriceAmount":[{"AmountCurrencyIdentifier":"USD","AmountContent":1200}],"BaseQuantity":[{"QuantityUnitCode":"EA","QuantityContent":1}],"ValidityPeriod":[{"StartDate":[{"DateContent":"1977-05-15"}]},{"EndDate":[{"DateContent":"1977-05-15"}]}]}],"Item":[{"Description":[{"TextContent":"I want a brown sofa"}],"SellersItemIdentification":[{"IssuerParty":[{"PartyIdentification":[{"ID":[{"IdentifierContent":"444666777"}]}],"PartyName":[{"Name":[{"TextContent":"Sofastore"}]}]}]}],"CommodityClassification":[{"ItemClassificationCode":[{"CodeListIdentifier":"UNSPSC","CodeListAgencyIdentifier":"113","CodeContent":"56101502"}]}]}]}],"DocumentReference":[{"ID":[{"IdentifierContent":"order-01"}]}]}],"UBLVersionID":[{"IdentifierContent":"2.0"}],"CustomizationID":[{"IdentifierContent":"urn:tradeshift.com:ubl-2.0-customizations:2010-06"}],"ProfileID":[{"IdentificationSchemeIdentifier":"CWA 16073:2010","IdentificationSchemeAgencyIdentifier":"1","IdentificationSchemeAgencyNameText":"CEN/ISSS WS/BII","IdentifierContent":"urn:www.cenbii.eu:profile:bii04:ver1.0"}],"CreationDate":[{"DateContent":"1977-05-15"}],"CreationTime":[{"TimeContent":"1977-05-15"}],"BuyerCustomerParty":[{"Party":[{"PartyIdentification":[{"ID":[{"IdentificationSchemeIdentifier":"TS:ID","IdentifierContent":"79eec713-cd84-4a4d-86b5-e35527ef3b3b"}]}],"PartyName":[{"Name":[{"TextContent":"Zurich"}]}],"Contact":[{"ID":[{"IdentificationSchemeUniformResourceIdentifier":"http://tradeshift.com/api/1.0/userId","IdentifierContent":"UUID"}],"ElectronicMail":[{"TextContent":"pelle@johnsson.se"}]}]}]}]}]},"schema":{"type":"string"}},"*/*":{"schema":{"type":"string"}}},"required":true},"parameters":[{"name":"Content-Type","in":"header","required":true,"description":"The MIME media type of the request content. Example: text/xml, application/xml, application/json, application/vnd.oasis.ubl+json\n","schema":{"type":"string"}},{"name":"draft","in":"query","description":"Parameter that indicates if the document should be created in draft mode or not. Documents such as Order Change, Receipt Advice, Remittance Advice,\nStatus Messages, Reminder Messages or Assignments can't be created as drafts while documents such as Invoice are partially validated when it is saved as draft.\n","schema":{"default":false,"type":"boolean"}},{"name":"documentProfileId","in":"query","required":true,"description":"The document profile id of the document which will be created (e.g. \"tradeshift.requisition.ubl.1.0\"), from the 'documentprofiles' resource.","schema":{"type":"string"}},{"name":"schemaValidate","in":"query","description":"Parameter that indicates if the document should be validated against the UBL schema. If this parameter is set to TRUE, the API will detect the UBL\nversion to validate against from the document content. This validation is triggered only if the document is *not* created as draft and also\nif the Nemhandel validation is enabled for the specified document profile.\n","schema":{"default":true,"type":"boolean"}},{"name":"validateDocumentProfile","in":"query","description":"Parameter that indicates if the document should be validated or not using the selected document profile.\nThe validation is triggered only if the document is not created as draft.\n","schema":{"default":true,"type":"boolean"}}],"x-annotation-dx-category":"documents-document","summary":"update document","tags":["dx-category--documents-document"]},"delete":{"responses":{"204":{"description":"The document was deleted successfully."},"401":{"description":"The user was not authorized to perform the operation."},"404":{"description":"Document with the specified id was not found."}},"description":"Soft delete of the document. Deleting a document using this API will not delete the document from the\nsystem, but mark it as deleted. This operation will only affect user's copy of the document, receiver's\n(or sender's) copy will remain intact.\nUser can still query deleted documents if they wish to do so. More details about how to retrieve deleted\ndocument can be found in [Find Documents](#get-rest-external-documents) section.\nIt's not recommended to delete a document using given endpoint.\n","operationId":"delete-rest-external-documents-documentid","x-annotation-dx-category":"documents-document","summary":"delete document","tags":["dx-category--documents-document"]}},"/rest/external/documents/{documentId}/attachments":{"parameters":[{"name":"documentId","in":"path","required":true,"schema":{"type":"string"},"description":"Document UUID identifier"}],"get":{"responses":{"200":{"description":"","content":{"application/json":{"example":{"DocumentAttachment":[{"Name":"Screen Shot 2016-09-08 at 2.59.56 PM.png","ContentType":"image/png","Type":"attachment"}]},"schema":{"required":["DocumentAttachment"],"type":"object","properties":{"DocumentAttachment":{"type":"array","items":{"required":["Name","ContentType","Type"],"type":"object","properties":{"Name":{"type":"string"},"ContentType":{"type":"string"},"Type":{"type":"string"}}}}}}}}}},"description":"Returns a list of all attachments a document has","operationId":"get-rest-external-documents-documentid-attachments","x-annotation-dx-category":"documents-attachments","summary":"find document attachments","tags":["dx-category--documents-attachments"]}},"/rest/external/documents/{documentId}/attachments/{name}/content":{"parameters":[{"name":"name","in":"path","required":true,"schema":{"type":"string"},"description":"File name of the attachment"},{"name":"documentId","in":"path","required":true,"schema":{"type":"string"},"description":"Document UUID identifier"}],"put":{"responses":{"201":{"description":""}},"description":"Create a new attachment for the document","operationId":"put-rest-external-documents-documentid-attachments-name-content","requestBody":{"content":{"*/*":{"schema":{"type":"string"}}},"required":true},"x-annotation-dx-category":"documents-attachments","summary":"update document attachment","tags":["dx-category--documents-attachments"]},"delete":{"responses":{"200":{"description":"The document attachment was deleted successfully."},"400":{"description":"Bad Request due to invalid input."},"401":{"description":"The user was not authorized to perform the operation."},"404":{"description":"The document attachment was not found."}},"description":"Removes an existing attachment having the provided parameter name from the document.\nThis can be used when the document attachment is either outdated or not applicable any more.\n","operationId":"delete-rest-external-documents-documentid-attachments-name-content","x-annotation-dx-category":"documents-attachments","summary":"delete document attachment","tags":["dx-category--documents-attachments"]}},"/rest/external/documents/{documentId}/content":{"parameters":[{"name":"documentId","in":"path","required":true,"schema":{"type":"string"},"description":"Document UUID identifier"}],"delete":{"responses":{"204":{"description":"The document was truncated successfully"},"401":{"description":"User was not authorized to truncate the specified document"}},"description":"Truncate the content for the given document if any exists. This action cannot be revoked or reverted.\nThis is to be used if document content must be permanently wiped, for example for privacy reasons. Truncated documents\nwill have all content except number and issue date removed. All versions of the document will also be truncated\nincluding the document attachments. The document will not be visible in the document manager UI.\n","operationId":"delete-rest-external-documents-documentid-content","x-annotation-dx-category":"documents-document","summary":"remove document content","tags":["dx-category--documents-document"]}},"/rest/external/documents/{documentId}/convert":{"parameters":[{"name":"documentId","in":"path","required":true,"schema":{"type":"string"},"description":"Document UUID identifier"}],"get":{"responses":{"200":{"description":"The conversion was done successfully and the converted document is returned.","content":{"text/xml":{"schema":{"example":{"DocumentType":"CreditNoteType","UBLVersionID":{"value":"2.0"},"CustomizationID":{"value":"urn:tradeshift.com:ubl-2.0-customizations:2010-06"},"ProfileID":{"value":"urn:www.cenbii.eu:profile:bii04:ver1.0","schemeID":"CWA 16073:2010","schemeAgencyID":"CEN/ISSS WS/BII","schemeVersionID":"1"},"ID":{"value":"INV60.3"},"IssueDate":{"value":"2021-05-07"},"DocumentCurrencyCode":{"value":"EUR"},"AdditionalDocumentReference":[{"ID":{"value":"HALF_UP"},"DocumentTypeCode":{"value":"RoundingRule","listID":"urn:tradeshift.com:api:1.0:documenttypecode"}}],"AccountingSupplierParty":{"Party":{"PartyIdentification":[{"ID":{"value":"d2252c87-8b38-4c89-9fe8-08f681d030db","schemeID":"TS:ID"}}],"PartyName":[{"Name":{"value":"SellerC"}}],"PostalAddress":{"AddressFormatCode":{"value":"5","listID":"UN/ECE 3477","listAgencyID":"6","listVersionID":"D08B"},"StreetName":{"value":"qwert"},"BuildingNumber":{"value":""},"CityName":{"value":"Berlin"},"PostalZone":{"value":"11111"},"Country":{"IdentificationCode":{"value":"DE"}}},"Contact":{"ID":{"value":"e278ce06-af3d-11eb-8529-0242ac130003","schemeURI":"http://tradeshift.com/api/1.0/userId"},"Name":{"value":"SellerC-NAME1 TradeshiftSellerC-NAME2"},"ElectronicMail":{"value":"mail+TradeshiftSellerC@tradeshift.com"}},"Person":{"FirstName":{"value":"SellerC-NAME1"},"FamilyName":{"value":"SellerC-NAME2"}}}},"AccountingCustomerParty":{"Party":{"PartyIdentification":[{"ID":{"value":"e8400cb4-af3d-11eb-8529-0242ac130003","schemeID":"TS:ID"}}],"PartyName":[{"Name":{"value":"BuyerC"}}],"PostalAddress":{"AddressFormatCode":{"value":"5","listID":"UN/ECE 3477","listAgencyID":"6","listVersionID":"D08B"},"StreetName":{"value":"asd"},"BuildingNumber":{"value":""},"CityName":{"value":"Berlin"},"PostalZone":{"value":"11111"},"Country":{"IdentificationCode":{"value":"DE"}}},"Contact":{}}},"TaxTotal":[{"TaxAmount":{"value":0.2,"currencyID":"EUR"},"TaxSubtotal":[{"TaxableAmount":{"value":1,"currencyID":"EUR"},"TaxAmount":{"value":0.2,"currencyID":"EUR"},"TaxCategory":{"ID":{"value":"S","schemeID":"UN/ECE 5305","schemeAgencyID":"6","schemeVersionID":"D08B"},"Percent":{"value":20},"TaxScheme":{"ID":{"value":"VAT","schemeID":"UN/ECE 5153 Subset","schemeAgencyID":"6","schemeVersionID":"D08B"},"Name":{"value":"VAT"}}}}]}],"LegalMonetaryTotal":{"LineExtensionAmount":{"value":1,"currencyID":"EUR"},"TaxExclusiveAmount":{"value":0.2,"currencyID":"EUR"},"TaxInclusiveAmount":{"value":1.2,"currencyID":"EUR"},"PayableAmount":{"value":1.2,"currencyID":"EUR"}},"CreditNoteLine":[{"ID":{"value":"1"},"CreditedQuantity":{"value":1,"unitCode":"EA"},"LineExtensionAmount":{"value":1,"currencyID":"EUR"},"TaxTotal":[{"TaxAmount":{"value":0.2,"currencyID":"EUR"},"TaxSubtotal":[{"TaxableAmount":{"value":1,"currencyID":"EUR"},"TaxAmount":{"value":0.2,"currencyID":"EUR"},"CalculationSequenceNumeric":{"value":1},"TaxCategory":{"ID":{"value":"S","schemeID":"UN/ECE 5305","schemeAgencyID":"6","schemeVersionID":"D08B"},"Percent":{"value":20},"TaxScheme":{"ID":{"value":"VAT","schemeID":"UN/ECE 5153 Subset","schemeAgencyID":"6","schemeVersionID":"D08B"},"Name":{"value":"VAT"}}}}]}],"Item":{"Description":[{"value":"1"}],"Name":{"value":"1"},"SellersItemIdentification":{"ID":{"value":"1"}}},"Price":{"PriceAmount":{"value":1,"currencyID":"EUR"},"BaseQuantity":{"value":1,"unitCode":"EA"},"OrderableUnitFactorRate":{"value":1}}}]}}}}},"401":{"description":"User was not authorized to view the specified document"},"404":{"description":"The provided document id does not exists"}},"description":"This endpoint allows the conversion of a draft document to another type, keeping the same id. Its primary purpose is\nfor when an Invoice or a CreditNote has been created as draft but with the wrong type. The only valid conversions are of\ndraft invoices to draft credit notes or vice-versa. The converted document will not be saved or dispatched. If the client requires this action,\nother endpoints can be used. More details about saving or dispatching can be found in\n[Send Document](#post-rest-external-documents-dispatcher), [Update Document](#put-rest-external-documents-documentid) or\n[Dispatch A Saved Document](#put-rest-external-documents-documentid-dispatches-dispatchid).\n","operationId":"get-rest-external-documents-documentid-convert","parameters":[{"name":"Accept","in":"header","required":true,"description":"The MIME media type of the response content. Example: text/xml and application/json\n","schema":{"default":"text/xml","type":"string"}},{"name":"targetDocumentType","in":"query","required":true,"description":"This parameter represents the document type to convert to. It should be either (case-sensitive) 'invoice' or 'creditnote'.","schema":{"type":"string"}},{"name":"targetDocumentTargetType","in":"query","required":true,"description":"This parameter represents the document profile id that the document adheres to\n(e.g. 'tradeshift.invoice.ubl.1.0'), from the 'documentprofiles' resource.\n","schema":{"type":"string"}},{"name":"draft","in":"query","description":"Parameter that indicates if the document should be converted in draft mode or not.\n","schema":{"default":false,"type":"boolean"}},{"name":"withAttachments","in":"query","description":"Parameter that indicates if the converted document should contain the source document attachements or not.","schema":{"default":true,"type":"boolean"}}],"x-annotation-dx-category":"documents-document","summary":"convert a document","tags":["dx-category--documents-document"]}},"/rest/external/documents/{documentId}/dispatches/first":{"parameters":[{"name":"documentId","in":"path","required":true,"schema":{"type":"string"},"description":"Document UUID identifier"}],"get":{"responses":{"200":{"description":"The dispatch of the document exists and is returned successfully.","content":{"application/json":{"schema":{"example":{"DispatchId":"2ecdb6ac-b133-4c7c-80aa-650391af98f6","ObjectId":"383eb7da-31dd-5c4e-878c-026443e46067","Created":"2016-09-02T01:07:21.461Z","SenderUserId":"63ef84c2-83c0-473b-a634-3a57d8109b39","DispatchState":"COMPLETED","LastStateChange":"2016-09-02T01:07:21.461Z","ReceiverConnectionId":"44dc8810-e582-5252-963b-20fd0754765f","DispatchChannel":"EMAIL"}}}}},"404":{"description":"The provided dispatch id does not exists."}},"description":"Get the first dispatch information with regards to a previously dispatched document","operationId":"get-rest-external-documents-documentid-dispatches-first","parameters":[{"name":"Accept","in":"header","required":true,"description":"The MIME media type of the response content. Example: text/xml, application/json, application/*\n","schema":{"default":"text/xml","type":"string"}}],"x-annotation-dx-category":"documents-document","summary":"Get First Dispatch","tags":["dx-category--documents-document"]}},"/rest/external/documents/{documentId}/dispatches/latest":{"parameters":[{"name":"documentId","in":"path","required":true,"schema":{"type":"string"},"description":"Document UUID identifier"}],"get":{"responses":{"200":{"description":"The dispatch of the document exists and is returned successfully.","content":{"application/json":{"schema":{"example":{"DispatchId":"2ecdb6ac-b133-4c7c-80aa-650391af98f6","ObjectId":"383eb7da-31dd-5c4e-878c-026443e46067","Created":"2016-09-02T01:07:21.461Z","SenderUserId":"63ef84c2-83c0-473b-a634-3a57d8109b39","DispatchState":"COMPLETED","LastStateChange":"2016-09-02T01:07:21.461Z","ReceiverConnectionId":"44dc8810-e582-5252-963b-20fd0754765f","DispatchChannel":"EMAIL"}}}}},"404":{"description":"The provided dispatch id does not exists."}},"description":"Get the latest dispatch information with regards to a previously dispatched document","operationId":"get-rest-external-documents-documentid-dispatches-latest","parameters":[{"name":"Accept","in":"header","required":true,"description":"The MIME media type of the response content. Example: text/xml, application/json, application/*\n","schema":{"default":"text/xml","type":"string"}}],"x-annotation-dx-category":"documents-document","summary":"Get Latest Dispatch","tags":["dx-category--documents-document"]}},"/rest/external/documents/{documentId}/dispatches/{dispatchId}":{"parameters":[{"name":"dispatchId","in":"path","required":true,"schema":{"type":"string"},"description":"The dispatch id used for dispatching the document"},{"name":"documentId","in":"path","required":true,"schema":{"type":"string"},"description":"Document UUID identifier"}],"put":{"responses":{"201":{"description":"The document with provided id was dispatched successfully."},"400":{"description":"Bad Request due to invalid input. The document with provided id has validation errors.","content":{"application/json":{"example":{"ErrorCode":"BadRequest","Message":"Could not resolve type nonExistentType","ErrorDetail":[{"Key":"message","Value":"Could not resolve type nonExistentType"},{"Key":"stacktrace","Value":"com.tradeshift.commons.exception.BadRequestException: Could not resolve type nonExistentType\n\tat com.tradeshift.coding.rest.CodingResource.getCodingLists(CodingResource.java:85)\n\t"}],"ValidationError":[],"RequestId":"2c941598-489c-4fac-8543-03cb921feaf7"},"schema":{"title":"Tradeshift Public API 1.0 - TradeshiftException","required":["ErrorCode","Message","RequestId"],"type":"object","additionalProperties":false,"properties":{"ErrorCode":{"type":"string"},"Message":{"type":"string"},"ErrorDetail":{"type":"array","items":{"type":"object","additionalProperties":false,"properties":{"Key":{"type":"string"},"Value":{"type":"string"}},"required":["Key","Value"]}},"ValidationError":{"type":"array","items":{"type":"object"}},"RequestId":{"pattern":"^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$","description":"String representation of an Universally unique identifier (UUID), version 5. See RFC 4122","type":"string"}}}}}},"404":{"description":"The document with provided id was not found."},"503":{"description":"The error occurs due to the expired custom document profile that is used for validation. The system\nrequests a new one, but it is retrieved asynchronously, so 503 'ObjectNotFound' error is generated.\nThis is a temporary state and a client should handle this error by trying to issue the same request later.\n","content":{"application/json":{"example":{"ErrorCode":"ObjectNotFound","Message":"Timed out (12500) waiting for doc profile 78767202-6a13-11eb-9439-0242ac130002 from company: 7c253956-6a13-11eb-9439-0242ac130002","ErrorDetail":[{"Key":"message","Value":"Timed out (12500) waiting for doc profile 78767202-6a13-11eb-9439-0242ac130002 from company: 7c253956-6a13-11eb-9439-0242ac130002"},{"Key":"stacktrace","Value":"com.tradeshift.commons.exception.ProcessingException: Timed out (12500) waiting for doc profile 78767202-6a13-11eb-9439-0242ac130002 from company: 7c253956-6a13-11eb-9439-0242ac130002"}],"ValidationError":[],"RequestId":"68dade8f-2f38-442b-8bdd-91a274b30177"},"schema":{"title":"Tradeshift Public API 1.0 - TradeshiftException","required":["ErrorCode","Message","RequestId"],"type":"object","additionalProperties":false,"properties":{"ErrorCode":{"type":"string"},"Message":{"type":"string"},"ErrorDetail":{"type":"array","items":{"type":"object","additionalProperties":false,"properties":{"Key":{"type":"string"},"Value":{"type":"string"}},"required":["Key","Value"]}},"ValidationError":{"type":"array","items":{"type":"object"}},"RequestId":{"pattern":"^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$","description":"String representation of an Universally unique identifier (UUID), version 5. See RFC 4122","type":"string"}}}}}}},"description":"Dispatch a previously saved document. The client can decide on the UUID for the new dispatch. \nIf the receiver has custom validations enabled, the document will be validated using the receivers custom document profile. \nThe body of the PUT is a connection identifier object which is not mandatory. If connectionId is not provided, the connection id will be determined from the document. \nWhen Content-Type header is text/xml, the minimal request body should be in the format `<DispatchRequest xmlns=\"http://tradeshift.com/api/public/1.0\"/>`, even if no connectionId is being provided.\n","operationId":"put-rest-external-documents-documentid-dispatches-dispatchid","requestBody":{"content":{"application/json":{"example":{"ConnectionId":"20758da1-c5b8-50f5-92b1-ceaaf25d99b7"},"schema":{"type":"string"}},"text/xml":{"example":"<DispatchRequest xmlns=\"http://tradeshift.com/api/public/1.0\"/>\n","schema":{"type":"object"}}},"required":true},"parameters":[{"name":"Content-Type","in":"header","required":true,"description":"The MIME media type of the request content. Example: text/xml, application/json\n","schema":{"default":"text/xml","type":"string"}},{"name":"documentSource","in":"query","description":"Track the document's source - We save the source of the document in a new table called documentsource so that we know where the document was dispatched from.","schema":{"type":"string"}}],"x-annotation-dx-category":"documents-document","summary":"Dispatch a saved document","tags":["dx-category--documents-document"]}},"/rest/external/documents/{documentId}/dispatches/{dispatchId}/scanIOReject":{"parameters":[{"name":"dispatchId","in":"path","required":true,"schema":{"type":"string"},"description":"The dispatch id used for dispatching the document"},{"name":"documentId","in":"path","required":true,"schema":{"type":"string"},"description":"Document UUID identifier"}],"put":{"responses":{"201":{"description":"The document with provided id was dispatched successfully."},"400":{"description":"Bad Request due to invalid input. The document is missing the scanIOReject, scanIORejectMessage and/or fr_cleared properties.","content":{"application/json":{"example":{"ErrorCode":"BadRequest","Message":"Could not resolve type nonExistentType","ErrorDetail":[{"Key":"message","Value":"Could not resolve type nonExistentType"},{"Key":"stacktrace","Value":"com.tradeshift.commons.exception.BadRequestException: Could not resolve type nonExistentType\n\tat com.tradeshift.coding.rest.CodingResource.getCodingLists(CodingResource.java:85)\n\t"}],"ValidationError":[],"RequestId":"2c941598-489c-4fac-8543-03cb921feaf7"},"schema":{"title":"Tradeshift Public API 1.0 - TradeshiftException","required":["ErrorCode","Message","RequestId"],"type":"object","additionalProperties":false,"properties":{"ErrorCode":{"type":"string"},"Message":{"type":"string"},"ErrorDetail":{"type":"array","items":{"type":"object","additionalProperties":false,"properties":{"Key":{"type":"string"},"Value":{"type":"string"}},"required":["Key","Value"]}},"ValidationError":{"type":"array","items":{"type":"object"}},"RequestId":{"pattern":"^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$","description":"String representation of an Universally unique identifier (UUID), version 5. See RFC 4122","type":"string"}}}}}},"404":{"description":"The document with provided id was not found."},"503":{"description":"The error occurs due to the expired custom document profile that is used for validation. The system\nrequests a new one, but it is retrieved asynchronously, so 503 'ObjectNotFound' error is generated.\nThis is a temporary state and a client should handle this error by trying to issue the same request later.\n","content":{"application/json":{"example":{"ErrorCode":"ObjectNotFound","Message":"Timed out (12500) waiting for doc profile 78767202-6a13-11eb-9439-0242ac130002 from company: 7c253956-6a13-11eb-9439-0242ac130002","ErrorDetail":[{"Key":"message","Value":"Timed out (12500) waiting for doc profile 78767202-6a13-11eb-9439-0242ac130002 from company: 7c253956-6a13-11eb-9439-0242ac130002"},{"Key":"stacktrace","Value":"com.tradeshift.commons.exception.ProcessingException: Timed out (12500) waiting for doc profile 78767202-6a13-11eb-9439-0242ac130002 from company: 7c253956-6a13-11eb-9439-0242ac130002"}],"ValidationError":[],"RequestId":"68dade8f-2f38-442b-8bdd-91a274b30177"},"schema":{"title":"Tradeshift Public API 1.0 - TradeshiftException","required":["ErrorCode","Message","RequestId"],"type":"object","additionalProperties":false,"properties":{"ErrorCode":{"type":"string"},"Message":{"type":"string"},"ErrorDetail":{"type":"array","items":{"type":"object","additionalProperties":false,"properties":{"Key":{"type":"string"},"Value":{"type":"string"}},"required":["Key","Value"]}},"ValidationError":{"type":"array","items":{"type":"object"}},"RequestId":{"pattern":"^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$","description":"String representation of an Universally unique identifier (UUID), version 5. See RFC 4122","type":"string"}}}}}}},"description":"Dispatch a previously saved document that was rejected by Scan IO validation. The client can decide on the UUID for the new dispatch.\nThe document must already have the `scanIOReject`, `scanIORejectMessage` and `fr_cleared` properties set, otherwise a 400 error is returned.\nThe documentSource for this dispatch is always set to `scanIO`.\nThe body of the PUT is a connection identifier object which is not mandatory. If connectionId is not provided, the connection id will be determined from the document.\nWhen Content-Type header is text/xml, the minimal request body should be in the format `<DispatchRequest xmlns=\"http://tradeshift.com/api/public/1.0\"/>`, even if no connectionId is being provided.\n","operationId":"put-rest-external-documents-documentid-dispatches-dispatchid-scanioreject","requestBody":{"content":{"application/json":{"example":{"ConnectionId":"20758da1-c5b8-50f5-92b1-ceaaf25d99b7"},"schema":{"type":"string"}},"text/xml":{"example":"<DispatchRequest xmlns=\"http://tradeshift.com/api/public/1.0\"/>\n","schema":{"type":"object"}}},"required":true},"parameters":[{"name":"Content-Type","in":"header","required":true,"description":"The MIME media type of the request content. Example: text/xml, application/json\n","schema":{"default":"text/xml","type":"string"}}],"x-annotation-dx-category":"documents-document","summary":"Dispatch a saved document rejected by Scan IO validation","tags":["dx-category--documents-document"]}},"/rest/external/documents/{documentId}/lockedstate/{state}":{"parameters":[{"name":"state","in":"path","required":true,"schema":{"type":"boolean"},"description":"This parameter indicates if the document should be marked as sent (locked) or not."},{"name":"documentId","in":"path","required":true,"schema":{"type":"string"},"description":"Document UUID identifier"}],"put":{"responses":{"204":{"description":"If the document exists, it state will be set to LOCKED."}},"description":"Mark a draft document as either sale or purchase if any exists. After this operation, the document cannot be modified in any way.\nIf the \"sent\" parameter is set to TRUE then the document will be marked as SALE, otherwise the document will be marked as\nPURCHASE.\n","operationId":"put-rest-external-documents-documentid-lockedstate-state","x-annotation-dx-category":"documents-document","summary":"lock a draft document","tags":["dx-category--documents-document"]}},"/rest/external/documents/{documentId}/metadata":{"parameters":[{"name":"documentId","in":"path","required":true,"schema":{"type":"string"},"description":"Document UUID identifier"}],"get":{"responses":{"200":{"description":"","content":{"text/xml":{"example":"<DocumentMetadata xmlns=\"http://tradeshift.com/api/public/1.0\">\n    <DocumentId>1592a9a0-02b9-11e7-93ae-92361f002671</DocumentId>\n    <DocumentType mimeType=\"text/xml\" documentProfileId=\"tradeshift.invoice.ubl.1.0\" type=\"invoice\"/>\n    <ConversationId>7dfe1744-fa85-43cd-bd93-9995445316d1</ConversationId>\n    <State>DRAFT</State>\n    <Created>2017-03-06T23:08:12.535+01:00</Created>\n    <LastEdit>2017-03-06T23:08:12.535+01:00</LastEdit>\n    <ConnectionId>8ce36265-fafd-4801-83a0-4992631219db</ConnectionId>\n    <Tags/>\n    <PropertyList/>\n    <DispatchState>FAILED</DispatchState>\n    <Received>false</Received>\n    <ProcessState>PENDING</ProcessState>\n    <DeliveryState>FAILED</DeliveryState>\n    <UnifiedState>FAILED_DELIVERY</UnifiedState>\n    <AllowedActions>\n        <AllowedAction>\n            <Action>use:template</Action>\n        </AllowedAction>\n    </AllowedActions>\n    <AuthorUserId>259dabc7-6603-4b4b-ad69-aca032c4329e</AuthorUserId>\n    <OwnerCompanyAccountId>70dcbb97-c3bf-41cb-a5df-1fc542cb8989</OwnerCompanyAccountId>\n</DocumentMetadata>\n","schema":{"type":"object"}}}}},"description":"Get metadata for a document. Metadata cannot be edited.","operationId":"get-rest-external-documents-documentid-metadata","x-annotation-dx-category":"documents-document","summary":"find document metadata","tags":["dx-category--documents-document"]}},"/rest/external/documents/{documentId}/original":{"parameters":[{"name":"documentId","in":"path","required":true,"schema":{"type":"string"},"description":"Document UUID identifier"}],"get":{"responses":{"200":{"description":"The original content is returned as attachment\n","headers":{"Content-Disposition":{"description":"Sets filename according to RFC 6266","schema":{"type":"string"}}}},"400":{"description":"No document found for the supplied id\n"}},"description":"The Tradeshift platform dispatches documents in ubl format, but it allows the storing of different other formats as well.\nThese are automatically converted to ubl during the dispatch. The original content is stored and can be retrieved using this endpoint.\n","operationId":"get-rest-external-documents-documentid-original","parameters":[{"name":"Accept","in":"header","required":true,"description":"The MIME media type of the response content. Example: */*\n","schema":{"type":"string"}}],"x-annotation-dx-category":"documents-document","summary":"Get original content of existing documents within platform","tags":["dx-category--documents-document"]},"post":{"responses":{"202":{"description":"The submission command for storing the document has been saved. In order to check the actual status\nof uploading, the url returned as **Location** in header should be accessed.\n","headers":{"Location":{"description":"The url for checking the status of importing the document.\n","schema":{"type":"string"}}}},"400":{"description":"No document provided in request body\n"}},"description":"It supports storing different document formats apart from ubl. In case of a non-ubl document format an automatic conversion to ubl is performed.\nThe document is saved as it was submitted and could be retrieved in its original format.\n**NOTE: When importing a PDF,only invoices and credit notes are supported, and some discrepancies can be expected between the uploaded\nPDF and resulting ubl draft. This sometimes happens due to bad quality of the uploaded PDF.**\n","operationId":"post-rest-external-documents-documentid-original","requestBody":{"content":{"*/*":{"schema":{"properties":{"file":{"description":"Actual content of the document to be imported\n","type":"string"}},"required":["file"],"type":"object"}}},"required":true},"parameters":[{"name":"Content-Type","in":"header","required":true,"description":"The MIME media type of the request content. Example: */*\n","schema":{"type":"string"}},{"name":"filename","in":"query","required":true,"description":"The filename of the original file\n","schema":{"type":"string"}},{"name":"schemaValidateUbl","in":"query","required":true,"description":"Whether to validate the created document against the UBL schema definition\n","schema":{"default":true,"type":"boolean"}},{"name":"validateDocumentProfile","in":"query","required":true,"description":"Whether to validate the created document against the document profile\n","schema":{"default":false,"type":"boolean"}}],"x-annotation-dx-category":"documents-document","summary":"Asynchronously import a document as a DRAFT","tags":["dx-category--documents-document"]}},"/rest/external/documents/{documentId}/original/responses/{responseId}":{"parameters":[{"name":"responseId","in":"path","required":true,"schema":{"type":"string"},"description":"The dispatch id used for dispatching the document"},{"name":"documentId","in":"path","required":true,"schema":{"type":"string"},"description":"Document UUID identifier"}],"get":{"responses":{"201":{"description":"The document import request finished successfully with the 'Location' header pointing to the created draft document."},"202":{"description":"The document import request is still processing."},"400":{"description":"The document import request has failed due to an invalid input. A list of ValidationErrors is provided."},"401":{"description":"User is not authorized to access the provided responseId."},"404":{"description":"The provided dispatch ID does not exist."},"500":{"description":"The document import request has failed due to internal errors."}},"description":"This resource allows the client to verify the response to an asynchronous import request. The API provides additional information\nregarding the latest import request of a document. The returned data can either contain a list of document validation errors which prevented the\nimport to run successfully or an import failed message if there were any import failures. If there are no errors returned then the\nimport has completed successfully and the client will receive HTTP 201 Created. If the document import is still in progress then\nHTTP 202 Accepted is returned. The client can decide wheather to inspect the document import status later or not.\n","operationId":"get-rest-external-documents-documentid-original-responses-responseid","parameters":[{"name":"Accept","in":"header","required":true,"description":"The MIME media type of the response content. Example: */*\n","schema":{"type":"string"}}],"x-annotation-dx-category":"documents-document","summary":"get document import request response","tags":["dx-category--documents-document"]}},"/rest/external/documents/{documentId}/properties":{"parameters":[{"name":"documentId","in":"path","required":true,"schema":{"type":"string"},"description":"Document UUID identifier"}],"get":{"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"example":{"user-property-1":"user-value-1","user-property-2":"user-value-2"}}}}},"401":{"description":"User was not authorized to view the specified document."}},"description":"Get all user properties for the specified document, excluding tags.","operationId":"get-rest-external-documents-documentid-properties","parameters":[{"name":"Accept","in":"header","required":true,"description":"The MIME media type of the response content. Example: application/json\n","schema":{"default":"application/json","type":"string"}}],"x-annotation-dx-category":"documents-document","summary":"Get document properties","tags":["dx-category--documents-document"]}},"/rest/external/documents/{documentId}/properties/{property_key}":{"parameters":[{"name":"property_key","in":"path","required":true,"schema":{"type":"string"},"description":"The key of the property which is being read, added or deleted"},{"name":"documentId","in":"path","required":true,"schema":{"type":"string"},"description":"Document UUID identifier"}],"get":{"responses":{"200":{"description":"Value of the given property key","content":{"text/plain":{"schema":{"example":"propertyValue"}}}},"204":{"description":"Property not found"},"401":{"description":"User was not authorized to view the specified document."}},"description":"Get document property value if found, otherwise return empty response.","operationId":"get-rest-external-documents-documentid-properties-property_key","parameters":[{"name":"Accept","in":"header","required":true,"description":"The MIME media type of the response content. Example: text/plain\n","schema":{"default":"text/plain","type":"string"}}],"x-annotation-dx-category":"documents-document","summary":"Get document property","tags":["dx-category--documents-document"]},"put":{"responses":{"201":{"description":"Property was added/updated successfully"},"401":{"description":"User was not authorized to view the specified document."}},"description":"Add or update document property (key & value).\nAdding properties can help cross references between Tradeshift and the interfacing system.\nFor example, adding an ERP posting number as a property to the document after posting, can help cross\nreferencing and reconciliation. The property can then be called e.g. \"ERPCode\" with a value like \"12345\".\nWhile supported it's not recommended to add properties before the document has been created, as neither\nreading nor writing pre created properties will be supported in future versions of the API.\n","operationId":"put-rest-external-documents-documentid-properties-property_key","requestBody":{"content":{"text/plain":{"example":"propertyValue","schema":{"type":"string"}}},"required":true},"parameters":[{"name":"Content-Type","in":"header","required":true,"description":"The MIME media type of the request content. Example: text/plain\n","schema":{"default":"text/plain","type":"string"}}],"x-annotation-dx-category":"documents-document","summary":"Add document property","tags":["dx-category--documents-document"]},"delete":{"responses":{"200":{"description":"Property was deleted succesfully"},"401":{"description":"User was not authorized to view the specified document."}},"description":"Delete document property.","operationId":"delete-rest-external-documents-documentid-properties-property_key","x-annotation-dx-category":"documents-document","summary":"Delete document property","tags":["dx-category--documents-document"]}},"/rest/external/documents/{documentId}/receivercompany":{"parameters":[{"name":"documentId","in":"path","required":true,"schema":{"type":"string"},"description":"Document UUID identifier"}],"get":{"responses":{"200":{"description":"property \"receiverCompanyId\" found and value returned","content":{"text/plain":{"schema":{"example":"a74cd946-6a08-11eb-9439-0242ac130002","type":"string"}}}},"204":{"description":"property \"receiverCompanyId\" not found and no value returned"},"404":{"description":"document not found"}},"description":"This endpoint allows the retrieval of the “receiverCompanyId” tag, using a document id.\nDuring the dispatch, the receiver side copy of the document is tagged with additional information.\nOne of the tags included is the “receiverCompanyId” which represents the company that receives the document.\nBecause this tag is only computed during the dispatch, it is only available on the receiver side copy of the\ndocument and it will most likely be the company itself, but in case of forwarding it will be the original receiver.\nThis is useful when an account has multiple child branches, and a user in the primary account wants to do a\nfiltered search for documents received by one of the branches.\n","operationId":"get-rest-external-documents-documentid-receivercompany","parameters":[{"name":"Accept","in":"header","required":true,"description":"media type of the response content it is expecting","schema":{"default":"text/plain","type":"string"}}],"x-annotation-dx-category":"documents-document","summary":"Get document's receiver company","tags":["dx-category--documents-document"]}},"/rest/external/documents/{documentId}/senderReferenceId":{"parameters":[{"name":"documentId","in":"path","required":true,"schema":{"type":"string"},"description":"Document UUID identifier"}],"get":{"responses":{"200":{"description":"property \"reference\" found and value returned","content":{"text/plain":{"schema":{"example":"a74cd946-6a08-11eb-9439-0242ac130002","type":"string"}}}},"404":{"description":"document or property not found"}},"description":"This endpoint returns the referenced document's id for a given document.\nDuring the dispatch, fx. sending a document to another account, a copy is created on the receiver side so that\neach side of the transaction has it's own copy of the document.\nThe receiver side copy of the document is tagged with additional information and one of the tags that are added\nis the “reference” tag, which represents the document id of the sender side copy.\nBecause this tag is only computed during the dispatch, it is only available on the receiver side copy and it\nis not availble on the sender side.\nThis tag is useful to link the two copies of the document together, and can be used by API integrations to\neasily retrieve the sender side copy.\n","operationId":"get-rest-external-documents-documentid-senderreferenceid","parameters":[{"name":"Accept","in":"header","required":true,"description":"media type of the response content it is expecting","schema":{"default":"text/plain","type":"string"}}],"x-annotation-dx-category":"documents-document","summary":"Get document's referenced id","tags":["dx-category--documents-document"]}},"/rest/external/documents/{documentId}/sendercompany":{"parameters":[{"name":"documentId","in":"path","required":true,"schema":{"type":"string"},"description":"Document UUID identifier"}],"get":{"responses":{"200":{"description":"property \"senderCompanyId\" found and value returned","content":{"text/plain":{"schema":{"example":"a74cd946-6a08-11eb-9439-0242ac130002","type":"string"}}}},"204":{"description":"property \"senderCompanyId\" not found and no value returned"},"404":{"description":"document not found"}},"description":"This endpoint allows the retrieval of the “senderCompanyId” tag, using a document id.\nDuring the dispatch, fx. sending a document to another account, a copy is created on the receiver side so\nthat each side of the transaction has it's own copy of the document. The receiver side copy is tagged with\nadditional information and one of the tags that are added is the “senderCompanyId” tag, which represents the\nid of the sender account.\nBecause this tag is only computed during the dispatch, it is only available on the receiver side copy and it\nis not available on the sender side.\nUse this API to uniquely identify the company in Tradeshift that initiated the dispatch.\n","operationId":"get-rest-external-documents-documentid-sendercompany","parameters":[{"name":"Accept","in":"header","required":true,"description":"media type of the response content it is expecting","schema":{"default":"text/plain","type":"string"}}],"x-annotation-dx-category":"documents-document","summary":"Get document's sender company","tags":["dx-category--documents-document"]}},"/rest/external/documents/{documentId}/statechange":{"parameters":[{"name":"documentId","in":"path","required":true,"schema":{"type":"string"},"description":"Document UUID identifier"}],"put":{"responses":{"204":{"description":"The state change was applied successfully."},"400":{"description":"Bad Request. The request body is empty or contains invalid XML content."},"401":{"description":"Unauthorized. The user does not have the UPDATE_DOCUMENT operation."}},"description":"Creates an ApplicationResponse to change the state of a document (e.g. accept, reject, dispute).\nThis endpoint calls a method secured with the UPDATE_DOCUMENT operation, allowing users with roles such as\nAccounts Payable Handler to change document state without requiring the CREATE_EDIT_DOCUMENT operation.\nOnly ApplicationResponse documents (tradeshift.status.1.0 profile) are supported.\nThe document profile is fixed and does not need to be specified by the caller.\n","operationId":"put-rest-external-documents-documentid-statechange","requestBody":{"content":{"text/xml":{"schema":{"type":"string"}},"application/xml":{"schema":{"type":"string"}}},"required":true},"parameters":[{"name":"Content-Type","in":"header","required":true,"description":"The MIME media type of the request content. Must be text/xml or application/xml.\n","schema":{"default":"text/xml","type":"string"}}],"x-annotation-dx-category":"documents-document","summary":"change document state","tags":["dx-category--documents-document"]}},"/rest/external/documents/{documentId}/tags":{"parameters":[{"name":"documentId","in":"path","required":true,"schema":{"type":"string"},"description":"Document UUID identifier"}],"get":{"responses":{"200":{"description":"The list of tags for the provided document id, if found","content":{"application/json":{"example":{"Tag":["document-tag-1","document-tag-2","document-tag-3"]},"schema":{"type":"object","properties":{"Tag":{"type":"array","items":{"type":"string"}}},"required":["Tag"]}}}}},"description":"Get all tags for the specified document. This is a generic document API endpoint which covers all document types.\n","operationId":"get-rest-external-documents-documentid-tags","parameters":[{"name":"Accept","in":"header","required":true,"description":"The MIME media type of the response content. Example: text/xml, application/json\n","schema":{"default":"text/xml","type":"string"}}],"x-annotation-dx-category":"documents-document","summary":"get document tags","tags":["dx-category--documents-document"]}},"/rest/external/documents/{documentId}/tags/{tag}":{"parameters":[{"name":"tag","in":"path","required":true,"schema":{"type":"string"},"description":"The tag value that will be added or removed."},{"name":"documentId","in":"path","required":true,"schema":{"type":"string"},"description":"Document UUID identifier"}],"put":{"responses":{"201":{"description":"The tag value was updated successfully."}},"description":"Add or replace a tag on a document. Tags might be visible in the TS user interface, and are shared between\nAPI accessors. This is a generic document API endpoint which covers all document types. To avoid pulling the\nsame document again and again, tag the invoice, and then poll for only documents without this tag in #1.\nA tag is just a string, and a document can have multiple tags. It can be used to keep track of sub steps in\nthe integration, for instance Pulled, Transformed and Posted, which would be three tags suitable for\ndebugging and integration.\n","operationId":"put-rest-external-documents-documentid-tags-tag","x-annotation-dx-category":"documents-document","summary":"add document tag","tags":["dx-category--documents-document"]},"delete":{"responses":{"200":{"description":"The tag was deleted successfully."}},"description":"Removes a tag from a document. This will also be removed from the TS user interface. This is a generic\ndocument API endpoint which covers all document types.\n","operationId":"delete-rest-external-documents-documentid-tags-tag","x-annotation-dx-category":"documents-document","summary":"delete document tag","tags":["dx-category--documents-document"]}},"/rest/external/gliprefixes/{companyId}":{"parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"string"},"description":"Company (tenant) UUID identifier of company to administer TSGLI prefixes for."}],"get":{"responses":{"200":{"description":"List of TSGLI prefixes","content":{"application/json":{"example":[{"Prefix":"hq.london","Label":"Headquarters London prefix"},{"Prefix":"de.berlin","Label":"Berlin office prefix"}],"schema":{"title":"Tradeshift Public API 1.0 - GLI List","type":"array","additionalProperties":false,"items":{"required":["Label","Prefix"],"type":"object","properties":{"Prefix":{"type":"string"},"Label":{"type":"string"}}}}}}}},"description":"Get all TSGLI prefixes for a company","operationId":"get-rest-external-gliprefixes-companyid","x-annotation-dx-category":"accounts-gli_prefixes","summary":"find gli prefixes","tags":["dx-category--accounts-gli_prefixes"]},"post":{"responses":{"201":{"description":"The TSGLI prefix was successfully created."},"400":{"description":"Bad request error. Any message as text/plain message."}},"description":"Create new TSGLI prefix for a company","operationId":"post-rest-external-gliprefixes-companyid","requestBody":{"content":{"application/json":{"example":{"Prefix":"hqprefix","Label":"Headquarters prefix"},"schema":{"title":"Tradeshift Public API 1.0 - GLI","required":["Prefix","Label"],"type":"object","additionalProperties":false,"properties":{"Prefix":{"type":"string"},"Label":{"type":"string"}}}},"application/xml":{"example":"<GLI xmlns=\"http://tradeshift.com/api/1.0\">\n    <Prefix>hqprefix</Prefix>\n    <Label>Headquarters prefix</Label>\n</GLI>\n","schema":{"type":"object"}}},"required":true},"x-annotation-dx-category":"accounts-gli_prefixes","summary":"update gli prefixes","tags":["dx-category--accounts-gli_prefixes"]}},"/rest/external/gliprefixes/{companyId}/{prefix}":{"parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"string"},"description":"Company (tenant) UUID identifier of company to administer TSGLI prefixes for."},{"name":"prefix","in":"path","required":true,"schema":{"type":"string"},"description":"TSGLI prefix"}],"delete":{"responses":{"204":{"description":"The TSGLI prefix was successfully deleted."},"400":{"description":"Bad request error. Any message as text/plain message."}},"description":"Delete TSGLI prefix","operationId":"delete-rest-external-gliprefixes-companyid-prefix","x-annotation-dx-category":"accounts-gli_prefixes","summary":"remove gli prefixes","tags":["dx-category--accounts-gli_prefixes"]}},"/rest/external/legalentities/{id}":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The UUID identifier of the legal entity."}],"put":{"responses":{"201":{"description":"The legal entity is created and there are no validation errors"},"204":{"description":"An existing legal entity was updated."}},"description":"Create or update a legal entity. If a legal entity with the same id already exists, the existing legal entity will be updated, otherwise the legal entity will be created. While updating the legal entity, only the name, description, legal note and alternate id are updated. During the creation or the updating process, a check is done to see if the alternate id is unique within the same company. The operation is allowed only if the id is unique per company. The body of the PUT is an object that specifies all the values to be saved as part of the legal entity. The legal entity id in this object MUST be absent or as same as the legal entity id in the path parameter. LegalNote may contain plain text or a restricted HTML subset (<b>, <u>, <br/> only); any other markup is stripped server-side. Its visible text, once that formatting is applied, is limited to ~5000 characters - not the raw payload length.","operationId":"put-rest-external-legalentities-id","requestBody":{"content":{"application/json":{"example":{"Id":"42f824cc-fa0d-4f96-9f82-0987e326cfdf","CompanyId":"9b4ce0ff-d8fa-4906-9984-216df4fcbfbc","Name":"Legal Entity IE22","AlternateEntityId":"IE22","Description":"Just a test legal entity","LegalNote":"<b>Payment terms:</b> Net 30 days.<br/>Please reference PO number on all invoices.<br/><u>Multilingual note:</u> Bitte geben Sie die Bestellnummer auf allen Rechnungen an."},"schema":{"required":["Id","CompanyId","Name","AlternateEntityId","Description","LegalNote"],"type":"object","properties":{"Id":{"pattern":"^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$","description":"String representation of an Universally unique identifier (UUID), version 5. See RFC 4122","type":"string"},"CompanyId":{"pattern":"^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$","description":"String representation of an Universally unique identifier (UUID), version 5. See RFC 4122","type":"string"},"Name":{"type":"string"},"AlternateEntityId":{"type":"string"},"Description":{"type":"string"},"LegalNote":{"maxLength":20000,"description":"Plain text or a restricted HTML subset (<b>, <u>, <br/> only - any other markup is stripped server-side). This maxLength bounds the raw, tag-inclusive payload; the enforced limit is ~5000 characters of visible text once formatting is applied.","type":"string"}}}}},"required":true},"x-annotation-dx-category":"accounts-legal_entities","summary":"update legal entity","tags":["dx-category--accounts-legal_entities"]}},"/rest/external/legalentities/{id}/identifiers/{identifier}":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The UUID identifier of the legal entity."},{"name":"identifier","in":"path","required":true,"schema":{"type":"string"},"description":"The id of the legal entity for which the identifier is to be added."}],"put":{"responses":{"201":{"description":"The identifier was created"},"204":{"description":"The identifier with the same scheme already existed and was therefore updated."},"400":{"description":"No identifier has been provided."},"404":{"description":"The provided legal entity ID does not exist."}},"description":"Add or update a legal entity identifier. If a value already exists for the identifier scheme then the value of the identifier is updated. Otherwise, a new identifier is added. Except for the label, all other fields are compulsory. The body of the PUT is an identifier object that needs to be added. The legal entity id in this object MUST be absent or as same as the legal entity id in the path parameter.","operationId":"put-rest-external-legalentities-id-identifiers-identifier","requestBody":{"content":{"application/json":{"example":{"LegalEntityId":"f392d865-5852-4255-b013-17075dba5bb6","IdentifierScheme":"GB:VAT","IdentifierValue":"GB987654321","Label":"VAT Reg No:"},"schema":{"required":["LegalEntityId","IdentifierScheme","IdentifierValue","Label"],"type":"object","properties":{"LegalEntityId":{"pattern":"^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$","description":"String representation of an Universally unique identifier (UUID), version 5. See RFC 4122","type":"string"},"IdentifierScheme":{"type":"string"},"IdentifierValue":{"type":"string"},"Label":{"type":"string"}}}}},"required":true},"x-annotation-dx-category":"accounts-legal_entities","summary":"update legal entity identifiers","tags":["dx-category--accounts-legal_entities"]}},"/rest/external/legalentities/{id}/locations/search":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The UUID identifier of the legal entity."}],"get":{"responses":{"200":{"description":"","content":{"application/json":{"example":{"Id":"64265696-449f-4d1a-9c48-464cd1b4ea73","LegalEntityId":"f392d865-5852-4255-b013-17075dba5bb6","Type":"BILLING","IsDefault":true,"Address":{"zip":"33466","country":"GB","buildingnumber":"3","city":"Billing-na-Donu","street":"Billing street","locality":"Billingovka"}},"schema":{"required":["Id","LegalEntityId","Type","IsDefault","Address"],"type":"object","properties":{"Id":{"pattern":"^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$","description":"String representation of an Universally unique identifier (UUID), version 5. See RFC 4122","type":"string"},"LegalEntityId":{"pattern":"^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$","description":"String representation of an Universally unique identifier (UUID), version 5. See RFC 4122","type":"string"},"Type":{"type":"string"},"IsDefault":{"type":"boolean"},"Address":{"required":["zip","country","buildingnumber","city","street","locality"],"type":"object","properties":{"zip":{"type":"string"},"country":{"type":"string"},"buildingnumber":{"type":"string"},"city":{"type":"string"},"street":{"type":"string"},"locality":{"type":"string"}}}}}}}},"400":{"description":"Will return bad request for more than 5 query parameters."}},"description":"Search all locations for a legal entity. The results are paged.","operationId":"get-rest-external-legalentities-id-locations-search","parameters":[{"name":"query","in":"query","required":true,"description":"The list of terms to search for terms are simple words like 'alber' or numeric. Every term is post fixed with a wildcard, numeric values are not, max to 5 terms, throws bad request if above.","schema":{"type":"string"}},{"name":"type","in":"query","description":"The type of locations to be fetched e.g billing or delivery.","schema":{"type":"string"}},{"name":"page","in":"query","description":"The page number to start fetching locations from.","schema":{"type":"integer"}},{"name":"limit","in":"query","description":"The number of items to be fetched per page.","schema":{"maximum":100,"type":"integer"}},{"name":"only_defaults","in":"query","description":"Only default addresses.","schema":{"type":"boolean"}}],"x-annotation-dx-category":"accounts-legal_entities","summary":"find locations for legal entity","tags":["dx-category--accounts-legal_entities"]}},"/rest/external/legalentities/{id}/locations/{locationid}":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The UUID identifier of the legal entity."},{"name":"locationid","in":"path","required":true,"schema":{"type":"string"},"description":"The UUID identifier of the location of the legal entity."}],"put":{"responses":{"201":{"description":"The location was created"},"204":{"description":"Existing location with the same id existed and therefore was updated."},"400":{"description":"No location has been provided."},"404":{"description":"The provided legal entity ID does not exist."}},"description":"Creates or updates a new location. If the id already exists, the call overwrites the existing values with the new ones that are supplied. If no location with the same id exists then a new one will be added. While adding a default location, a check will be done to see if this call does not create another default location over an existing one. If it does, a validation error will be thrown. The path parameter id replaces the one in the object. The body of the PUT is an object which is the location to be saved for the legal entity. The legal entity id in this object MUST be absent or as same as the legal entity id in the path parameter.","operationId":"put-rest-external-legalentities-id-locations-locationid","requestBody":{"content":{"application/json":{"example":{"Id":"64265696-449f-4d1a-9c48-464cd1b4ea73","LegalEntityId":"f392d865-5852-4255-b013-17075dba5bb6","Type":"BILLING","IsDefault":true,"Address":{"zip":"33466","country":"GB","buildingnumber":"3","city":"Billing-na-Donu","street":"Billing street","locality":"Billingovka"}},"schema":{"required":["Id","LegalEntityId","Type","IsDefault","Address"],"type":"object","properties":{"Id":{"pattern":"^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$","description":"String representation of an Universally unique identifier (UUID), version 5. See RFC 4122","type":"string"},"LegalEntityId":{"pattern":"^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$","description":"String representation of an Universally unique identifier (UUID), version 5. See RFC 4122","type":"string"},"Type":{"type":"string"},"IsDefault":{"type":"boolean"},"Address":{"required":["zip","country","buildingnumber","city","street","locality"],"type":"object","properties":{"zip":{"type":"string"},"country":{"type":"string"},"buildingnumber":{"type":"string"},"city":{"type":"string"},"street":{"type":"string"},"locality":{"type":"string"}}}}}}},"required":true},"x-annotation-dx-category":"accounts-legal_entities","summary":"update legal entities for location","tags":["dx-category--accounts-legal_entities"]}},"/rest/external/network":{"get":{"responses":{"default":{"description":""}},"description":"Get the user's connections and a list of companies according to the query parameter","operationId":"get-rest-external-network","parameters":[{"name":"query","in":"query","description":"List of keywords to narrow the results","schema":{"type":"string"}},{"name":"limit","in":"query","description":"Maximum number of results, and number of results on each skipped page of results","schema":{"default":25,"type":"number"}},{"name":"page","in":"query","description":"Number of result pages to skip","schema":{"default":0,"type":"number"}}],"x-annotation-dx-category":"network-search","summary":"search network","tags":["dx-category--network-search"]}},"/rest/external/network/companies":{"get":{"responses":{"default":{"description":""}},"description":"Get a list of Companies in the Tradeshift network according to the query parameters","operationId":"get-rest-external-network-companies","parameters":[{"name":"query","in":"query","description":"List of keywords to narrow the results","schema":{"type":"string"}},{"name":"limit","in":"query","description":"Maximum number of results, and number of results on each skipped page of results","schema":{"default":25,"maximum":100,"type":"number"}},{"name":"omitConnections","in":"query","description":"Omit companies with existing connections","schema":{"default":false,"type":"boolean"}},{"name":"page","in":"query","description":"Number of result pages to skip","schema":{"default":0,"type":"number"}}],"x-annotation-dx-category":"network-search","summary":"get companies","tags":["dx-category--network-search"]}},"/rest/external/network/connect/{companyId}":{"parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"string"},"description":"The UUID of the company to create a connection to"}],"post":{"responses":{"201":{"description":"","headers":{"Location":{"description":"Path to retrieve data regarding the newly created connection.","schema":{"type":"string"}}}}},"description":"Creates a networkRequest to the specified company. If the company is in the same zone as the current company then a TradeshiftCompanyConnection is created. If the company is not in the same zone a RemoteCompanyConnection is created.\n","operationId":"post-rest-external-network-connect-companyid","x-annotation-dx-category":"network-requests","summary":"add network connection","tags":["dx-category--network-requests"]}},"/rest/external/network/connections":{"get":{"responses":{"200":{"description":"A list of connections matching the criteria.\n","content":{"application/json":{"example":{"itemsPerPage":1,"itemCount":1,"numPages":1,"pageId":1,"Connection":[{"ConnectionId":"1aafff37-5dd9-4df1-8902-4f5500e2bc09","ConnectionType":"TradeshiftConnection","FromCompanyAccountId":"8f7f8172-eea4-44dd-b5cf-c6c5b8e13b6f","ToCompanyAccountId":"35c00082-34ac-44c7-aadb-3c3e094493aa","State":"ACCEPTED"}]},"schema":{"title":"Tradeshift Public API 1.0 - Connection Summary List","type":"object","additionalProperties":false,"properties":{"itemsPerPage":{"type":"integer"},"itemCount":{"type":"integer"},"numPages":{"type":"integer"},"pageId":{"type":"integer"},"Connection":{"type":"array","items":{"required":["connectionId","connectionType","fromCompanyAccountId","toCompanyAccountId","state"],"type":"object","properties":{"connectionId":{"pattern":"^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$","description":"String representation of an Universally unique identifier (UUID), version 5. See RFC 4122","type":"string"},"connectionType":{"enum":["TradeshiftConnection","ExternalConnection"],"type":"string"},"fromCompanyAccountId":{"pattern":"^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$","description":"String representation of an Universally unique identifier (UUID), version 5. See RFC 4122","type":"string"},"toCompanyAccountId":{"pattern":"^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$","description":"String representation of an Universally unique identifier (UUID), version 5. See RFC 4122","type":"string"},"state":{"enum":["CREATED","REQUESTED","ACCEPTED"],"type":"string"}}}}},"required":["itemsPerPage","itemCount","numPages","pageId","Connection"]}}}},"400":{"description":"Bad Request due to invalid input. More details in body."}},"description":"Returns the connections in the network of the current user according to the query parameter.","operationId":"get-rest-external-network-connections","parameters":[{"name":"companyAccountId","in":"query","description":"Get connections to the specified companyAccountId. Can be used multiple times (max 100), which is interpreted as OR. Ignored when query is set.\n","schema":{"type":"array","items":{"type":"string"}}},{"name":"query","in":"query","description":"List of keywords to narrow the results","schema":{"type":"string"}},{"name":"type","in":"query","description":"Return only connections of this specified type, either 'TradeshiftConnection' or 'ExternalConnection'","schema":{"default":"Any","type":"string"}},{"name":"passive","in":"query","description":"Whether to include passive connections","schema":{"default":false,"type":"boolean"}},{"name":"includeProperties","in":"query","description":"Include connection properties","schema":{"default":false,"type":"boolean"}},{"name":"excludeWithProperty","in":"query","description":"Exclude connections having specified property, can optionally be used in conjuction with excludeWithPropertyValue","schema":{"default":false,"type":"boolean"}},{"name":"excludeWithPropertyValue","in":"query","description":"Exclude connections having specified property value, to be used in conjuction with excludeWithProperty","schema":{"default":false,"type":"boolean"}},{"name":"branchId","in":"query","description":"Only search for connections in this branch id","schema":{"type":"string"}},{"name":"limit","in":"query","description":"Maximum number of results, and number of results on each skipped page of results.","schema":{"default":25,"type":"number"}},{"name":"page","in":"query","description":"Number of result pages to skip","schema":{"default":0,"type":"number"}}],"x-annotation-dx-category":"network-search","summary":"get connections","tags":["dx-category--network-search"]}},"/rest/external/network/connections/accountingSystemId/{accountingSystemId}":{"parameters":[{"name":"accountingSystemId","in":"path","required":true,"schema":{"type":"string"},"description":"identifier of the accountingSystemId"}],"get":{"responses":{"200":{"description":"A list of connections matching the criteria.\n","content":{"application/json":{"example":{"itemsPerPage":1,"itemCount":1,"numPages":1,"pageId":1,"Connection":[{"ConnectionId":"1aafff37-5dd9-4df1-8902-4f5500e2bc09","ConnectionType":"TradeshiftConnection","FromCompanyAccountId":"8f7f8172-eea4-44dd-b5cf-c6c5b8e13b6f","ToCompanyAccountId":"35c00082-34ac-44c7-aadb-3c3e094493aa","State":"ACCEPTED"}]},"schema":{"title":"Tradeshift Public API 1.0 - Connection Summary List","type":"object","additionalProperties":false,"properties":{"itemsPerPage":{"type":"integer"},"itemCount":{"type":"integer"},"numPages":{"type":"integer"},"pageId":{"type":"integer"},"Connection":{"type":"array","items":{"required":["connectionId","connectionType","fromCompanyAccountId","toCompanyAccountId","state"],"type":"object","properties":{"connectionId":{"pattern":"^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$","description":"String representation of an Universally unique identifier (UUID), version 5. See RFC 4122","type":"string"},"connectionType":{"enum":["TradeshiftConnection","ExternalConnection"],"type":"string"},"fromCompanyAccountId":{"pattern":"^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$","description":"String representation of an Universally unique identifier (UUID), version 5. See RFC 4122","type":"string"},"toCompanyAccountId":{"pattern":"^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$","description":"String representation of an Universally unique identifier (UUID), version 5. See RFC 4122","type":"string"},"state":{"enum":["CREATED","REQUESTED","ACCEPTED"],"type":"string"}}}}},"required":["itemsPerPage","itemCount","numPages","pageId","Connection"]}}}},"400":{"description":"Bad Request due to invalid input. More details in body.","content":{"application/json":{"example":{"ErrorCode":"BadRequest","Message":"Could not resolve type nonExistentType","ErrorDetail":[{"Key":"message","Value":"Could not resolve type nonExistentType"},{"Key":"stacktrace","Value":"com.tradeshift.commons.exception.BadRequestException: Could not resolve type nonExistentType\n\tat com.tradeshift.coding.rest.CodingResource.getCodingLists(CodingResource.java:85)\n\t"}],"ValidationError":[],"RequestId":"2c941598-489c-4fac-8543-03cb921feaf7"},"schema":{"title":"Tradeshift Public API 1.0 - TradeshiftException","required":["ErrorCode","Message","RequestId"],"type":"object","additionalProperties":false,"properties":{"ErrorCode":{"type":"string"},"Message":{"type":"string"},"ErrorDetail":{"type":"array","items":{"type":"object","additionalProperties":false,"properties":{"Key":{"type":"string"},"Value":{"type":"string"}},"required":["Key","Value"]}},"ValidationError":{"type":"array","items":{"type":"object"}},"RequestId":{"pattern":"^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$","description":"String representation of an Universally unique identifier (UUID), version 5. See RFC 4122","type":"string"}}}}}}},"description":"Search for existing or potential connections by AccountingSystemId\n","operationId":"get-rest-external-network-connections-accountingsystemid-accountingsystemid","parameters":[{"name":"limit","in":"query","description":"Maximum number of results to display, and size of each page to skip.","schema":{"default":25,"minimum":0,"maximum":100,"type":"number"}},{"name":"page","in":"query","description":"Number of pages of results to skip","schema":{"default":0,"type":"number"}}],"x-annotation-dx-category":"network-search","summary":"find network connections with accountingSystemId","tags":["dx-category--network-search"]}},"/rest/external/network/connections/companies/{companyId}":{"parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"string"},"description":"UUID identifier of company account."}],"get":{"responses":{"200":{"description":"connection matching the criteria.\n","content":{"application/json":{"example":{"ConnectionId":"ff5ce009-2156-4a61-8d0b-e4dc87a5ad8e","ConnectionType":"CompanyConnection","FromCompanyAccountId":"073f3379-cf9d-4999-99b0-135c0a477633","CompanyName":"Seller2","Country":"AM","AcceptingDocumentProfiles":[],"CompanyAccountId":"2d4cc7e4-25a3-4a51-bb2a-e76cbb6432d1","State":"ACCEPTED","Properties":{},"Identifiers":[{"scheme":"TS:ID","value":"2d4cc7e4-25a3-4a51-bb2a-e76cbb6432d1"}],"AddressLines":[],"RelationTypes":[]},"schema":{"type":"string"}}}},"404":{"description":""}},"description":"Get a connection to a specific account. If the current user is connected to the account, the connection will be returned, otherwise 404 will be returned\n","operationId":"get-rest-external-network-connections-companies-companyid","x-annotation-dx-category":"network-search","summary":"get connection for company","tags":["dx-category--network-search"]}},"/rest/external/network/connections/companies/{companyId}/properties/{propertyKey}":{"parameters":[{"name":"propertyKey","in":"path","required":true,"schema":{"type":"string"},"description":"Connection property key"},{"name":"companyId","in":"path","required":true,"schema":{"type":"string"},"description":"UUID identifier of company account."}],"put":{"responses":{"204":{"description":""}},"description":"Stores a single value for a property key on the multiple connections that point to a given companyAccountId","operationId":"put-rest-external-network-connections-companies-companyid-properties-propertykey","x-annotation-dx-category":"network-connection_properties","summary":"set connection property","tags":["dx-category--network-connection_properties"]}},"/rest/external/network/connections/{connectionId}":{"parameters":[{"name":"connectionId","in":"path","required":true,"schema":{"type":"string"},"description":"Connection identifier as UUID."}],"get":{"responses":{"200":{"description":"","content":{"text/xml":{"example":"<TradeshiftConnection xmlns=\"http://tradeshift.com/api/public/1.0\">\n  <ConnectionId>4b7e8e41-9c8f-474b-b71b-2bcca615b441</ConnectionId>\n  <CreatedDate>2016-09-08T14:09:33.098+02:00</CreatedDate>\n  <CompanyAccountId>e4e91b4b-0737-40a8-be7b-3f651ffef6a9</CompanyAccountId>\n  <State>REQUESTED</State>\n</TradeshiftConnection>\n","schema":{"type":"object"}}}}},"description":"Retrieves an existing tradeshift or external connection. The returned structure depends on the kind of connection.\n","operationId":"get-rest-external-network-connections-connectionid","x-annotation-dx-category":"network-connections","summary":"find network connection","tags":["dx-category--network-connections"]},"put":{"responses":{"201":{"description":"Returns the URL of the created connection. The location can in some cases contain another connectionId - this happens when creating a new connection to another Tradeshift user, which already exists.\n"}},"description":"Create a new connection or update an existing one. The connection is either an internal Tradeshift connection or an external connection.\n","operationId":"put-rest-external-network-connections-connectionid","requestBody":{"content":{"application/json":{"example":{"ConnectionType":"TradeshiftConnection","ConnectionId":"4b7e8e41-9c8f-474b-b71b-2bcca615b441","CreatedDate":"2016-09-08T14:09:33.098+02:00","CompanyAccountId":"e4e91b4b-0737-40a8-be7b-3f651ffef6a9","State":"ACCEPTED","Invitation":{"SendMail":true}},"schema":{"title":"Tradeshift Public API 1.0 - Conenction","required":["ConnectionType"],"type":"object","additionalProperties":false,"properties":{"ConnectionType":{"enum":["TradeshiftConnection","ExternalConnection"],"type":"string"},"ConnectionId":{"pattern":"^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$","description":"String representation of an Universally unique identifier (UUID), version 5. See RFC 4122","type":"string"},"CreatedDate":{"pattern":"^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}(\\.\\d{3})?(Z|(\\+|\\-)[0-9]{2}:[0-9]{2})","description":"ISO8601 formatted DateTime in UTC timezone, fx 2014-12-09T16:11:53Z with optionally .001 for milliseconds.","type":"string"},"CompanyAccountId":{"pattern":"^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$","description":"String representation of an Universally unique identifier (UUID), version 5. See RFC 4122","type":"string"},"Invitation":{"type":"object","additionalProperties":false,"properties":{"SendMail":{"type":"boolean"}},"required":["SendMail"]},"Properties":{"type":"object"},"State":{"enum":["CREATED","REQUESTED","ACCEPTED"],"type":"string"}}}},"text/xml":{"example":"<TradeshiftConnection xmlns=\"http://tradeshift.com/api/public/1.0\">\n  <ConnectionId>4b7e8e41-9c8f-474b-b71b-2bcca615b441</ConnectionId>\n  <CreatedDate>2016-09-08T14:09:33.098+02:00</CreatedDate>\n  <CompanyAccountId>e4e91b4b-0737-40a8-be7b-3f651ffef6a9</CompanyAccountId>\n</TradeshiftConnection>\n","schema":{"type":"object"}}},"required":true},"x-annotation-dx-category":"network-connections","summary":"update network connection","tags":["dx-category--network-connections"]},"delete":{"responses":{"204":{"description":"The connection was deleted"}},"description":"Rejects an existing connection, deleting it and makes it as not accepted with the applicable reverse connection.\n","operationId":"delete-rest-external-network-connections-connectionid","x-annotation-dx-category":"network-connections","summary":"delete network connection","tags":["dx-category--network-connections"]}},"/rest/external/network/connections/{connectionId}/detail":{"parameters":[{"name":"connectionId","in":"path","required":true,"schema":{"type":"string"},"description":"Connection identifier as UUID."}],"get":{"responses":{"200":{"description":""},"404":{"description":""}},"description":"Get the details for a connection. Contains the full information on the connection, including names, identifiers, etc. The same structure is returned for both tradeshift and external connections. However, only fields relevant to the connection kind are filled.\n","operationId":"get-rest-external-network-connections-connectionid-detail","x-annotation-dx-category":"network-connections","summary":"get connection detail","tags":["dx-category--network-connections"]}},"/rest/external/network/connections/{connectionId}/documentProfiles/{documentType}/inbound":{"parameters":[{"name":"documentType","in":"path","required":true,"schema":{"type":"string"},"description":"The type of document"},{"name":"connectionId","in":"path","required":true,"schema":{"type":"string"},"description":"Connection identifier as UUID."}],"get":{"responses":{"200":{"description":""}},"description":"Get the document profile that would be applied on incoming documents from the account pointed to by a connection.","operationId":"get-rest-external-network-connections-connectionid-documentprofiles-documenttype-inbound","x-annotation-dx-category":"network-document_profiles","summary":"find doc profile inbound","tags":["dx-category--network-document_profiles"]}},"/rest/external/network/connections/{connectionId}/documentProfiles/{documentType}/outbound":{"parameters":[{"name":"documentType","in":"path","required":true,"schema":{"type":"string"},"description":"The type of document"},{"name":"connectionId","in":"path","required":true,"schema":{"type":"string"},"description":"Connection identifier as UUID."}],"get":{"responses":{"200":{"description":""}},"description":"Get the document profile that would be applied on outgoing documents from the account pointed to by a connection.","operationId":"get-rest-external-network-connections-connectionid-documentprofiles-documenttype-outbound","x-annotation-dx-category":"network-document_profiles","summary":"find doc profile outbound","tags":["dx-category--network-document_profiles"]}},"/rest/external/network/connections/{connectionId}/properties":{"parameters":[{"name":"connectionId","in":"path","required":true,"schema":{"type":"string"},"description":"Connection identifier as UUID."}],"get":{"responses":{"200":{"description":"There are any properties on the connection","content":{"text/xml":{"example":"<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?>\n<ns5:ConnectionProperties xmlns:ns5=\"http://tradeshift.com/api/1.0\">\n    <ns5:Properties>\n        <ns5:Key>key</ns5:Key>\n        <ns5:Values>value</ns5:Values>\n    </ns5:Properties>\n</ns5:ConnectionProperties>\n","schema":{"type":"object"}}}},"204":{"description":"There are no properties on the connection"}},"description":"Retrieves all properties for a connection. Note that one property key can have a list of values.\n","operationId":"get-rest-external-network-connections-connectionid-properties","x-annotation-dx-category":"network-connection_properties","summary":"find properties","tags":["dx-category--network-connection_properties"]},"put":{"responses":{"204":{"description":"Properties replaced."}},"description":"Replaces existing properties with given properties.","operationId":"put-rest-external-network-connections-connectionid-properties","requestBody":{"content":{"application/json":{"example":{"Items":[{"Key":"propertyKey1","Values":["value1","value2"]},{"Key":"propertyKey2","Values":["value3"]}]},"schema":{"title":"Tradeshift Public API 1.0 - Connection Property List","type":"object","additionalProperties":false,"properties":{"Items":{"type":"array","items":{"type":"object"}}},"required":["Items"]}},"text/xml":{"example":"<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?>\n<ConnectionPropertyList xmlns=\"http://tradeshift.com/api/public/1.0\">\n    <Items>\n        <ConnectionProperty>\n            <Key>propertyKey1</Key>\n            <Values>value1</Values>\n            <Values>value2</Values>\n        </ConnectionProperty>\n    </Items>\n    <Items>\n        <Key>propertyKey2</Key>\n        <Values>value3</Values>\n    </Items>\n</ConnectionPropertyList>\n","schema":{"type":"object"}}},"required":true},"x-annotation-dx-category":"network-connection_properties","summary":"replace properties","tags":["dx-category--network-connection_properties"]},"post":{"responses":{"200":{"description":"Properties updated. Response body describes what happened for each property. Only when detailedResponse is true."},"204":{"description":"Properties updated. Only when detailedResponse is false."},"400":{"description":"Bad payload. E.g. the connection you try to update does not exist."}},"description":"Updates given properties.","operationId":"post-rest-external-network-connections-connectionid-properties","requestBody":{"content":{"application/json":{"example":{"Items":[{"Key":"propertyKey1","Values":["value1","value2"]},{"Key":"propertyKey2","Values":["value3"]}]},"schema":{"title":"Tradeshift Public API 1.0 - Connection Property List","type":"object","additionalProperties":false,"properties":{"Items":{"type":"array","items":{"type":"object"}}},"required":["Items"]}},"text/xml":{"example":"<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?>\n<ConnectionPropertyList xmlns=\"http://tradeshift.com/api/public/1.0\">\n    <Items>\n        <ConnectionProperty>\n            <Key>propertyKey1</Key>\n            <Values>value1</Values>\n            <Values>value2</Values>\n        </ConnectionProperty>\n    </Items>\n    <Items>\n        <Key>propertyKey2</Key>\n        <Values>value3</Values>\n    </Items>\n</ConnectionPropertyList>\n","schema":{"type":"object"}}},"required":true},"parameters":[{"name":"detailedResponse","in":"query","description":"Specify if a detailed response of what was updated should be returned.","schema":{"default":false,"type":"boolean"}}],"x-annotation-dx-category":"network-connection_properties","summary":"update properties","tags":["dx-category--network-connection_properties"]}},"/rest/external/network/connections/{connectionId}/properties/{key}":{"parameters":[{"name":"key","in":"path","required":true,"schema":{"type":"string"},"description":"Property key"},{"name":"connectionId","in":"path","required":true,"schema":{"type":"string"},"description":"Connection identifier as UUID."}],"get":{"responses":{"200":{"description":"The property exists on the connection","content":{"text/plain":{"schema":{"example":"myvalue"}}}},"204":{"description":"the property does not exist on the connection"}},"description":"Retrieves value for the given connection property key.","operationId":"get-rest-external-network-connections-connectionid-properties-key","x-annotation-dx-category":"network-connection_properties","summary":"find property by key","tags":["dx-category--network-connection_properties"]},"put":{"responses":{"204":{"description":"value added successfully."}},"description":"Stores a single value for given property key, replacing any previous value.","operationId":"put-rest-external-network-connections-connectionid-properties-key","requestBody":{"content":{"text/plain":{"example":"newvalue","schema":{"type":"string"}}},"required":true},"x-annotation-dx-category":"network-connection_properties","summary":"update property by key","tags":["dx-category--network-connection_properties"]},"delete":{"responses":{"204":{"description":"Property deleted."}},"description":"Deletes a property for a given key.","operationId":"delete-rest-external-network-connections-connectionid-properties-key","x-annotation-dx-category":"network-connection_properties","summary":"remove properties","tags":["dx-category--network-connection_properties"]}},"/rest/external/network/connections/{connectionId}/verify":{"parameters":[{"name":"connectionId","in":"path","required":true,"schema":{"type":"string"},"description":"Connection identifier as UUID."}],"post":{"responses":{"200":{"description":""}},"description":"Approves an \"unverified\" connection created by another party. \"Unverified\" connections are created in order to interact with companies that may not be active on Tradeshift.\n","operationId":"post-rest-external-network-connections-connectionid-verify","x-annotation-dx-category":"network-connections","summary":"verify connection","tags":["dx-category--network-connections"]}},"/rest/external/network/favorites":{"get":{"responses":{"default":{"description":""}},"description":"Get last used connections.","operationId":"get-rest-external-network-favorites","parameters":[{"name":"count","in":"query","description":"Number of results to return","schema":{"default":5,"type":"number"}}],"x-annotation-dx-category":"network-connections","summary":"get favorites","tags":["dx-category--network-connections"]}},"/rest/external/network/master/connections":{"get":{"responses":{"200":{"description":"A list of connections matching the criteria.\n","content":{"application/json":{"example":{"itemsPerPage":1,"itemCount":1,"numPages":1,"pageId":1,"Connection":[{"ConnectionId":"1aafff37-5dd9-4df1-8902-4f5500e2bc09","ConnectionType":"TradeshiftConnection","FromCompanyAccountId":"8f7f8172-eea4-44dd-b5cf-c6c5b8e13b6f","ToCompanyAccountId":"35c00082-34ac-44c7-aadb-3c3e094493aa","State":"ACCEPTED"}]},"schema":{"title":"Tradeshift Public API 1.0 - Connection Summary List","type":"object","additionalProperties":false,"properties":{"itemsPerPage":{"type":"integer"},"itemCount":{"type":"integer"},"numPages":{"type":"integer"},"pageId":{"type":"integer"},"Connection":{"type":"array","items":{"required":["connectionId","connectionType","fromCompanyAccountId","toCompanyAccountId","state"],"type":"object","properties":{"connectionId":{"pattern":"^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$","description":"String representation of an Universally unique identifier (UUID), version 5. See RFC 4122","type":"string"},"connectionType":{"enum":["TradeshiftConnection","ExternalConnection"],"type":"string"},"fromCompanyAccountId":{"pattern":"^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$","description":"String representation of an Universally unique identifier (UUID), version 5. See RFC 4122","type":"string"},"toCompanyAccountId":{"pattern":"^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$","description":"String representation of an Universally unique identifier (UUID), version 5. See RFC 4122","type":"string"},"state":{"enum":["CREATED","REQUESTED","ACCEPTED"],"type":"string"}}}}},"required":["itemsPerPage","itemCount","numPages","pageId","Connection"]}}}},"400":{"description":"Bad Request due to invalid input. More details in body."}},"description":"Returns only master direct connections according to the query parameter and includes connection properties","operationId":"get-rest-external-network-master-connections","parameters":[{"name":"query","in":"query","description":"List of keywords to narrow the results","schema":{"type":"string"}},{"name":"excludeWithProperty","in":"query","description":"Exclude connections having specified property, can optionally be used in conjuction with excludeWithPropertyValue","schema":{"default":false,"type":"boolean"}},{"name":"excludeWithPropertyValue","in":"query","description":"Exclude connections having specified property value, to be used in conjuction with excludeWithProperty","schema":{"default":false,"type":"boolean"}},{"name":"limit","in":"query","description":"Maximum number of results, and number of results on each skipped page of results.","schema":{"default":25,"type":"number"}},{"name":"page","in":"query","description":"Number of result pages to skip","schema":{"default":0,"type":"number"}}],"x-annotation-dx-category":"network-search","summary":"get master connections","tags":["dx-category--network-search"]}},"/rest/external/network/pending":{"get":{"responses":{"default":{"description":""}},"description":"Get the list of connections which are not yet mutual.","operationId":"get-rest-external-network-pending","parameters":[{"name":"limit","in":"query","description":"Maximum number of results, and number of results on each skipped page of results.","schema":{"default":25,"type":"number"}},{"name":"page","in":"query","description":"Number of result pages to skip","schema":{"default":0,"type":"number"}}],"x-annotation-dx-category":"network-requests","summary":"list pending connections","tags":["dx-category--network-requests"]}},"/rest/external/network/requests":{"get":{"responses":{"200":{"description":"","content":{"text/xml":{"example":"<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?>\n<NetworkRequestList xmlns=\"http://tradeshift.com/api/public/1.0\"\n    numPages=\"-1\"\n    pageId=\"0\" itemsPerPage=\"25\" itemCount=\"1\">\n  <Items>\n    <Id>8929a879-9827-4ebc-97f7-a4aaf8ace939</Id>\n    <SenderCompanyAccountId>a0e2b622-f745-44a6-9691-283751259090</SenderCompanyAccountId>\n    <Received>2017-03-16T21:43:06.536+01:00</Received>\n    <Connection>\n      <ConnectionType>TradeshiftConnection</ConnectionType>\n      <CompanyName>Simon's Catering and Cocktails</CompanyName>\n      <Country>US</Country>\n      <AcceptingDocumentProfiles/>\n      <CompanyAccountId>a0e2b622-f745-44a6-9691-283751259090</CompanyAccountId>\n      <Identifiers/>\n      <AddressLines/>\n    </Connection>\n  </Items>\n</NetworkRequestList>\n","schema":{"type":"object"}}}}},"description":"Get the list of pending network requests.","operationId":"get-rest-external-network-requests","parameters":[{"name":"limit","in":"query","description":"Maximum number of results, and number of results on each skipped page of results.","schema":{"default":25,"type":"number"}},{"name":"page","in":"query","description":"Number of result pages to skip","schema":{"default":0,"type":"number"}}],"x-annotation-dx-category":"network-requests","summary":"find network requests","tags":["dx-category--network-requests"]}},"/rest/external/network/requests/{connectionId}/accept":{"parameters":[{"name":"connectionId","in":"path","required":true,"schema":{"type":"string"},"description":"UUID identifier of the connection"}],"post":{"responses":{"200":{"description":"The network request was successfully accepted and the two companies are now connected. The connection ID (UUID) is returned as plaintext.\n","content":{"text/plain":{"schema":{"example":"8df77821-87b2-4251-b70a-c1ce03ab843d"}}}},"404":{"description":"Connection request was not accepted or does not exist."}},"description":"Accepts an existing connection request and marks the connection as accepted with the applicable reverse connection.","operationId":"post-rest-external-network-requests-connectionid-accept","x-annotation-dx-category":"network-requests","summary":"accept network request","tags":["dx-category--network-requests"]}},"/rest/external/network/suggest":{"get":{"responses":{"200":{"description":"A list of connections matching the criteria. The list can also contain potential connections to other Tradeshift users, these will have a null ConnectionId.\n","content":{"text/xml":{"example":"<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?>\n<ts:ConnectionList\n        xmlns:ts=\"http://tradeshift.com/api/public/1.0\" xmlns:ns5=\"http://tradeshift.com/api/1.0\"\n        numPages=\"-1\" pageId=\"-1\" itemsPerPage=\"1\" itemCount=\"1\">\n    <ts:Connection>\n        <ts:ConnectionType>TradeshiftConnection</ts:ConnectionType>\n        <ts:CompanyName>ELTEC Inc. rgatonxberlg</ts:CompanyName>\n        <ts:Country>US</ts:Country>\n        <ts:CompanyAccountId>c885e58e-da10-4cc3-9564-09e897392989</ts:CompanyAccountId>\n    </ts:Connection>\n</ts:ConnectionList>\n","schema":{"type":"object"}}}},"400":{"description":"Bad Request due to invalid input. More details in body."}},"description":"Search for existing or potential connections based on criteria. One of the following parameter combinations needs to be provided - country and companyName, identifierScheme and identifierValue, propertyKey and propertyValue, or email. All criteria are matched using exact, case-insensitive match unless exactMatch is set as false.\n","operationId":"get-rest-external-network-suggest","parameters":[{"name":"companyName","in":"query","description":"Must be provided with country, to search for an exact company name in a given country.","schema":{"type":"string"}},{"name":"country","in":"query","description":"Must be provided with companyName, to search for an exact company name in a given country. Valid 2-letter country codes are listed in the 'countries' resource.\n","schema":{"type":"string"}},{"name":"identifierScheme","in":"query","description":"Identifier scheme used to identify the company (one of the 'companytypes' resource) Each pair of identifierScheme and identifierValue will be interpreted as OR.\n","schema":{"type":"string"}},{"name":"identifierValue","in":"query","description":"Company identifier to search for (according to the given identifierScheme)","schema":{"type":"string"}},{"name":"email","in":"query","description":"E-mail address of one of the users of the company.","schema":{"type":"string"}},{"name":"existingConnectionsOnly","in":"query","description":"Limit results to only existing connections or only potential connections. Defaults to returning both existing and potential connections.","schema":{"type":"boolean"}},{"name":"limit","in":"query","description":"Maximum number of results to display, and size of each page to skip.","schema":{"default":25,"minimum":0,"maximum":100,"type":"number"}},{"name":"page","in":"query","description":"Number of pages of results to skip","schema":{"default":0,"type":"number"}},{"name":"propertyKey","in":"query","description":"Name of a property set on the connection.","schema":{"type":"string"}},{"name":"propertyValue","in":"query","description":"Value of the specified property name on the connection.","schema":{"type":"string"}},{"name":"includeShareableIdentifiers","in":"query","description":"Applicable when searching by identifiers. If enabled also include results where matching identifiers are shareable. Disabled by default.","schema":{"default":false,"type":"boolean"}}],"x-annotation-dx-category":"network-search","summary":"find network suggestions","tags":["dx-category--network-search"]}},"/rest/external/status-change-reasons":{"get":{"responses":{"200":{"description":"An object containing lists of rejection reasons and dispute reasons.","content":{"application/json":{"schema":{"example":{"rejectionReasons":[{"code":"TX_TVA_ERR","label":"Taux de TVA erroné"}],"disputeReasons":[{"code":"AUTRE","label":"Autre"}]}}}}}},"description":"Returns the list of available rejection reasons and dispute reasons\nthat can be used when changing the status of a document.\n","operationId":"get-rest-external-status-change-reasons","x-annotation-dx-category":"documents-document","summary":"get status change reasons","tags":["dx-category--documents-document"]}},"/rest/external/usergroups":{"get":{"responses":{"200":{"description":"A list of user groups without members returned as an ExternalUserGroupsList.\nIn case the user does not have any user groups then a blank list is returned.\n"},"400":{"description":"If one or more of the query parameters are invalid."}},"description":"Gets list of all user groups that the user has access to. Groups are fetched without members\nbut each user group entry will have the number of members it has.\n","operationId":"get-rest-external-usergroups","parameters":[{"name":"limit","in":"query","description":"The number of user groups to fetch per call.","schema":{"default":25,"minimum":0,"maximum":100,"type":"integer"}},{"name":"page","in":"query","description":"The page number from which to start fetching the user groups.","schema":{"default":0,"minimum":0,"type":"integer"}},{"name":"state","in":"query","description":"The state of the user groups.","schema":{"default":"ACTIVE","type":"string"}},{"name":"query","in":"query","description":"User group name query string.","schema":{"type":"string"}},{"name":"member","in":"query","description":"Returned user groups must have the supplied user is as a member.","schema":{"type":"string"}}],"x-annotation-dx-category":"users-memberships","summary":"Find user groups by query string","tags":["dx-category--users-memberships"]}},"/rest/external/users/{userId}/branches":{"parameters":[{"name":"userId","in":"path","required":true,"schema":{"type":"string"},"description":"User account UUID."}],"get":{"responses":{"200":{"description":"List of branches","content":{"application/json":{"example":[{"Id":"59cef2b3-3190-4329-b29f-00ac476b40da","Name":"Simon's Catering and Cocktails AGrvylkxsnevop","Country":"US"},{"Id":"89cef2b3-3190-4329-c29f-10ac476b40db","Name":"Petes's Cocktails ","Country":"US"}],"schema":{"title":"Tradeshift Public API 1.0 - GLI List","type":"array","additionalProperties":false,"items":{"type":"object","properties":{"Id":{"pattern":"^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$","description":"String representation of an Universally unique identifier (UUID), version 5. See RFC 4122","type":"string"},"Name":{"type":"string"},"Country":{"type":"string"}},"required":["Id","Name","Country"]}}}}},"400":{"description":"Company hierarchy is corrupted, unable to get root branch. Contact support team."},"404":{"description":"User not found or out of company hierarchy"}},"description":"Returns a list of branches for the specified user inside organisation hierarchy of his current company.\n","operationId":"get-rest-external-users-userid-branches","x-annotation-dx-category":"users-memberships","summary":"List of current company branches where the specified user is a member","tags":["dx-category--users-memberships"]}},"/rest/external/users/{userId}/current/branches":{"parameters":[{"name":"userId","in":"path","required":true,"schema":{"type":"string"},"description":"User account UUID."}],"get":{"responses":{"200":{"description":"List of branches"},"404":{"description":"User not found or out of company hierarchy"}},"description":"Returns a list of branches for the specified user inside organisation hierarchy of his current company.\n","operationId":"get-rest-external-users-userid-current-branches","x-annotation-dx-category":"users-memberships","summary":"List of current company branches starting from current branch where the specified user is a member","tags":["dx-category--users-memberships"]}},"/rest/external/users/{userId}/memberships/{groupId}":{"parameters":[{"name":"userId","in":"path","required":true,"schema":{"type":"string"},"description":"UUID identifier of user account."},{"name":"groupId","in":"path","required":true,"schema":{"type":"string"},"description":"UUID identifier of the security group"}],"delete":{"responses":{"204":{"description":"Always returns a 204"},"400":{"description":"returns bad request when users membership cannot be removed","content":{"application/json":{"example":{"ErrorCode":"BadRequest","Message":"Could not resolve type nonExistentType","ErrorDetail":[{"Key":"message","Value":"Could not resolve type nonExistentType"},{"Key":"stacktrace","Value":"com.tradeshift.commons.exception.BadRequestException: Could not resolve type nonExistentType\n\tat com.tradeshift.coding.rest.CodingResource.getCodingLists(CodingResource.java:85)\n\t"}],"ValidationError":[],"RequestId":"2c941598-489c-4fac-8543-03cb921feaf7"},"schema":{"title":"Tradeshift Public API 1.0 - TradeshiftException","required":["ErrorCode","Message","RequestId"],"type":"object","additionalProperties":false,"properties":{"ErrorCode":{"type":"string"},"Message":{"type":"string"},"ErrorDetail":{"type":"array","items":{"type":"object","additionalProperties":false,"properties":{"Key":{"type":"string"},"Value":{"type":"string"}},"required":["Key","Value"]}},"ValidationError":{"type":"array","items":{"type":"object"}},"RequestId":{"pattern":"^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$","description":"String representation of an Universally unique identifier (UUID), version 5. See RFC 4122","type":"string"}}}}}}},"description":"Remove user's membership to a group.","operationId":"delete-rest-external-users-userid-memberships-groupid","x-annotation-dx-category":"users-memberships","summary":"remove user membership","tags":["dx-category--users-memberships"]}},"/rest/external/users/{userId}/overridingcompanyaccountid":{"parameters":[{"name":"userId","in":"path","required":true,"schema":{"type":"string"},"description":"User account UUID."}],"put":{"responses":{"204":{"description":"Successful"},"400":{"description":"Bad Request due to invalid input. More details in body.","content":{"application/json":{"example":{"ErrorCode":"BadRequest","Message":"Could not resolve type nonExistentType","ErrorDetail":[{"Key":"message","Value":"Could not resolve type nonExistentType"},{"Key":"stacktrace","Value":"com.tradeshift.commons.exception.BadRequestException: Could not resolve type nonExistentType\n\tat com.tradeshift.coding.rest.CodingResource.getCodingLists(CodingResource.java:85)\n\t"}],"ValidationError":[],"RequestId":"2c941598-489c-4fac-8543-03cb921feaf7"},"schema":{"title":"Tradeshift Public API 1.0 - TradeshiftException","required":["ErrorCode","Message","RequestId"],"type":"object","additionalProperties":false,"properties":{"ErrorCode":{"type":"string"},"Message":{"type":"string"},"ErrorDetail":{"type":"array","items":{"type":"object","additionalProperties":false,"properties":{"Key":{"type":"string"},"Value":{"type":"string"}},"required":["Key","Value"]}},"ValidationError":{"type":"array","items":{"type":"object"}},"RequestId":{"pattern":"^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$","description":"String representation of an Universally unique identifier (UUID), version 5. See RFC 4122","type":"string"}}}}}},"401":{"description":"User is not a company admin or out of processed companies hierarchy.","content":{"application/json":{"example":{"ErrorCode":"Unauthorized","Message":"The user was not authorized to perform the operation&#x3a; 37617bf8&#x2d;4e04&#x2d;41f2&#x2d;bd27&#x2d;9ad9153419ee&#x2f;Operation&#x28;id&#x3d;15&#x2c; name&#x3d;ADMIN&#x5f;ID&#x29; on 35dea17e&#x2d;fdd7&#x2d;46d9&#x2d;88c8&#x2d;c5c632ebf92b","ErrorDetail":[{"Key":"userUuid","Value":"37617bf8-4e04-41f2-bd27-9ad9153419ee"},{"Key":"securityGroupUuid","Value":"35dea17e-fdd7-46d9-88c8-c5c632ebf92b"},{"Key":"operationId","Value":"15"},{"Key":"operationName","Value":"ADMIN_ID"},{"Key":"stacktrace","Value":""}],"ValidationError":[],"RequestId":"92463020-1aa1-48c6-b87f-ad8b97d0599e"},"schema":{"title":"Tradeshift Public API 1.0 - TradeshiftException","required":["ErrorCode","Message","RequestId"],"type":"object","additionalProperties":false,"properties":{"ErrorCode":{"type":"string"},"Message":{"type":"string"},"ErrorDetail":{"type":"array","items":{"type":"object","additionalProperties":false,"properties":{"Key":{"type":"string"},"Value":{"type":"string"}},"required":["Key","Value"]}},"ValidationError":{"type":"array","items":{"type":"object"}},"RequestId":{"pattern":"^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$","description":"String representation of an Universally unique identifier (UUID), version 5. See RFC 4122","type":"string"}}}}}},"404":{"description":"User not found.","content":{"application/json":{"example":{"ErrorCode":"ResourceNotFound","Message":"Error: ResourceNotFound: The object did not exist","ErrorDetail":[],"ValidationError":[],"RequestId":"e52264d2-f5c9-43ef-92f1-c40fa64cb3c2"},"schema":{"title":"Tradeshift Public API 1.0 - TradeshiftException","required":["ErrorCode","Message","RequestId"],"type":"object","additionalProperties":false,"properties":{"ErrorCode":{"type":"string"},"Message":{"type":"string"},"ErrorDetail":{"type":"array","items":{"type":"object","additionalProperties":false,"properties":{"Key":{"type":"string"},"Value":{"type":"string"}},"required":["Key","Value"]}},"ValidationError":{"type":"array","items":{"type":"object"}},"RequestId":{"pattern":"^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$","description":"String representation of an Universally unique identifier (UUID), version 5. See RFC 4122","type":"string"}}}}}}},"description":"Change home company environment which is displayed after the user logs in.\nThe requester must be a company admin and the requester's company must be a parent to the user's company and\noverriding company, otherwise 401 returns.\n","operationId":"put-rest-external-users-userid-overridingcompanyaccountid","requestBody":{"content":{"text/plain":{"example":"f54bca78-3ac9-4843-ae4a-f6808c0ea477","schema":{"type":"string"}}},"required":true},"x-annotation-dx-category":"users-memberships","summary":"Change home branch for a user","tags":["dx-category--users-memberships"]}},"/rest/external/users/{userId}/primarybranch/{newGroupId}":{"parameters":[{"name":"userId","in":"path","required":true,"schema":{"type":"string"},"description":"User account UUID."},{"name":"newGroupId","in":"path","required":true,"schema":{"type":"string"},"description":"UUID identifier of the security group"}],"put":{"responses":{"204":{"description":"OK"},"400":{"description":"User is not a memeber of new primary group or group is out of company hierarchy"},"401":{"description":"Requester is not authorized to perform operation."},"404":{"description":"User not found or out of company hierarchy"}},"description":"Change current primary group and remove old primary group membership. The user must be a member of new group.\nThe requester must be a company admin and requester's company must be a parent to user's primary company,\notherwise 401 returns.\n","operationId":"put-rest-external-users-userid-primarybranch-newgroupid","x-annotation-dx-category":"users-memberships","summary":"Change current primary group and remove old primary group membership","tags":["dx-category--users-memberships"]}},"/rest/external/assignments":{"get":{"responses":{"200":{"description":"Returns the paged list of filtered assignments. <br> If no assignments are found it returns an empty paged list.\n","content":{"application/json":{"example":{"total":2,"items":[{"id":"460b2008-8872-4620-8ed2-410ce5640fb9","externalId":"external id","subjectId":"280b2305-8872-3620-9ed2-010ce5640fb7","app":"APVerification","createdBy":"760b2008-8872-4620-8ed2-410ce5640fb4","assigneeIds":["12067d82-1308-4fd1-9d0b-12eafe99c4cd"],"companyId":"3fba6061-b51e-49bb-8c08-6cf6d28a304a","tags":["A tag","Another tag"],"type":"DOCUMENT","createdAt":"2018-10-25T10:56:27.311+03:00","modifiedAt":"2018-10-25T10:56:27.311+03:00","outcome":"An outcome","status":"OPEN","modifiedBy":"12067d82-1308-4fd1-9d0b-12eafe99c4cd","comment":"Assigned to default assignee.","context":{"format":"App.Tradeshift","context":["freeJson"]}},{"id":"a60b2008-8872-4620-8ed2-410ce5640fb9","externalId":"external id","subjectId":"360b2008-8872-4620-8ed2-410ce5640fb0","app":"APVerification","createdBy":"260b2008-8872-4620-8ed2-410ce5640fb3","assigneeIds":["12067d82-1308-4fd1-9d0b-12eafe99c4cd"],"companyId":"3fba6061-b51e-49bb-8c08-6cf6d28a304a","tags":[],"type":"A type","createdAt":"2018-10-25T16:40:31.795+03:00","modifiedAt":"2018-10-25T16:40:31.795+03:00","outcome":"An outcome","status":"CLOSED","modifiedBy":"12067d82-1308-4fd1-9d0b-12eafe99c4cd","comment":"Assigned to default assignee.","context":{"format":"App.Tradeshift","context":{}}}],"empty":false,"firstItem":{"id":"460b2008-8872-4620-8ed2-410ce5640fb9","externalId":"External-Id","subjectId":"280b2305-8872-3620-9ed2-010ce5640fb7","app":"APVerification","createdBy":"760b2008-8872-4620-8ed2-410ce5640fb4","assigneeIds":["12067d82-1308-4fd1-9d0b-12eafe99c4cd"],"companyId":"3fba6061-b51e-49bb-8c08-6cf6d28a304a","tags":["A tag","Another tag"],"type":"DOCUMENT","createdAt":"2018-10-25T10:56:27.311+03:00","modifiedAt":"2018-10-25T10:56:27.311+03:00","outcome":"An outcome","status":"OPEN","modifiedBy":"12067d82-1308-4fd1-9d0b-12eafe99c4cd","comment":"Assigned to default assignee.","context":{"format":"App.Tradeshift","context":["freeJson"]}}},"schema":{"title":"Tradeshift Public API 1.0 - Assignments","required":["total","items","empty"],"type":"object","additionalProperties":false,"properties":{"total":{"minimum":0,"description":"The number of assignments returned for the query","type":"integer"},"items":{"minItems":0,"uniqueItems":true,"type":"array","additionalProperties":false,"items":{"required":["id","subjectId","type"],"type":"object","properties":{"id":{"pattern":"^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$","description":"String representation of an Universally unique identifier (UUID), version 5. See RFC 4122","type":"string"},"subjectId":{"pattern":"^.{1,255}$","type":"string"},"app":{"pattern":"^.{1,255}$","type":"string"},"createdBy":{"pattern":"^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$","description":"String representation of an Universally unique identifier (UUID), version 5. See RFC 4122","type":"string"},"assigneeIds":{"minItems":1,"uniqueItems":true,"type":"array","additionalProperties":false,"items":{"pattern":"^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$","description":"String representation of an Universally unique identifier (UUID), version 5. See RFC 4122","type":"string"}},"companyId":{"pattern":"^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$","description":"String representation of an Universally unique identifier (UUID), version 5. See RFC 4122","type":"string"},"tags":{"minItems":0,"uniqueItems":true,"type":"array","additionalProperties":false,"items":{"type":"string"}},"type":{"pattern":"^.{1,255}$","type":"string"},"modifiedBy":{"pattern":"^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$","description":"String representation of an Universally unique identifier (UUID), version 5. See RFC 4122","type":"string"},"createdAt":{"pattern":"^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}(\\.\\d{3})?(Z|(\\+|\\-)[0-9]{2}:[0-9]{2})","description":"ISO8601 formatted DateTime in UTC timezone, fx 2014-12-09T16:11:53Z with optionally .001 for milliseconds.","type":"string"},"externalId":{"pattern":"^.{1,255}$","type":"string"},"modifiedAt":{"pattern":"^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}(\\.\\d{3})?(Z|(\\+|\\-)[0-9]{2}:[0-9]{2})","description":"ISO8601 formatted DateTime in UTC timezone, fx 2014-12-09T16:11:53Z with optionally .001 for milliseconds.","type":"string"},"assignmentLogs":{"minItems":0,"uniqueItems":true,"type":"array","items":{"type":"object","properties":{"id":{"type":"integer"},"outcome":{"type":"string"},"externalId":{"pattern":"^.{1,255}$","type":"string"},"status":{"type":"string"},"comment":{"type":"string"},"tags":{"minItems":0,"uniqueItems":true,"type":"array","additionalProperties":false,"items":{"type":"string"}},"createdAt":{"pattern":"^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}(\\.\\d{3})?(Z|(\\+|\\-)[0-9]{2}:[0-9]{2})","description":"ISO8601 formatted DateTime in UTC timezone, fx 2014-12-09T16:11:53Z with optionally .001 for milliseconds.","type":"string"}},"required":["id","outcome","externalId","status","comment","tags","createdAt"]}},"context":{"type":"object"},"delegations":{"uniqueItems":true,"type":"array","items":{"required":["delegator","delegatee"],"type":"object","properties":{"delegator":{"pattern":"^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$","description":"String representation of an Universally unique identifier (UUID), version 5. See RFC 4122","type":"string"},"delegatee":{"pattern":"^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$","description":"String representation of an Universally unique identifier (UUID), version 5. See RFC 4122","type":"string"},"delegatorType":{"type":"string"}}}}}}},"empty":{"type":"boolean"},"firstItem":{"required":["id","subjectId","type"],"type":"object","properties":{"id":{"pattern":"^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$","description":"String representation of an Universally unique identifier (UUID), version 5. See RFC 4122","type":"string"},"subjectId":{"pattern":"^.{1,255}$","type":"string"},"app":{"pattern":"^.{1,255}$","type":"string"},"createdBy":{"pattern":"^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$","description":"String representation of an Universally unique identifier (UUID), version 5. See RFC 4122","type":"string"},"assigneeIds":{"minItems":1,"uniqueItems":true,"type":"array","additionalProperties":false,"items":{"pattern":"^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$","description":"String representation of an Universally unique identifier (UUID), version 5. See RFC 4122","type":"string"}},"companyId":{"pattern":"^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$","description":"String representation of an Universally unique identifier (UUID), version 5. See RFC 4122","type":"string"},"tags":{"minItems":0,"uniqueItems":true,"type":"array","additionalProperties":false,"items":{"type":"string"}},"type":{"pattern":"^.{1,255}$","type":"string"},"modifiedBy":{"pattern":"^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$","description":"String representation of an Universally unique identifier (UUID), version 5. See RFC 4122","type":"string"},"createdAt":{"pattern":"^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}(\\.\\d{3})?(Z|(\\+|\\-)[0-9]{2}:[0-9]{2})","description":"ISO8601 formatted DateTime in UTC timezone, fx 2014-12-09T16:11:53Z with optionally .001 for milliseconds.","type":"string"},"externalId":{"pattern":"^.{1,255}$","type":"string"},"modifiedAt":{"pattern":"^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}(\\.\\d{3})?(Z|(\\+|\\-)[0-9]{2}:[0-9]{2})","description":"ISO8601 formatted DateTime in UTC timezone, fx 2014-12-09T16:11:53Z with optionally .001 for milliseconds.","type":"string"},"assignmentLogs":{"minItems":0,"uniqueItems":true,"type":"array","items":{"type":"object","properties":{"id":{"type":"integer"},"outcome":{"type":"string"},"externalId":{"pattern":"^.{1,255}$","type":"string"},"status":{"type":"string"},"comment":{"type":"string"},"tags":{"minItems":0,"uniqueItems":true,"type":"array","additionalProperties":false,"items":{"type":"string"}},"createdAt":{"pattern":"^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}(\\.\\d{3})?(Z|(\\+|\\-)[0-9]{2}:[0-9]{2})","description":"ISO8601 formatted DateTime in UTC timezone, fx 2014-12-09T16:11:53Z with optionally .001 for milliseconds.","type":"string"}},"required":["id","outcome","externalId","status","comment","tags","createdAt"]}},"context":{"type":"object"},"delegations":{"uniqueItems":true,"type":"array","items":{"required":["delegator","delegatee"],"type":"object","properties":{"delegator":{"pattern":"^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$","description":"String representation of an Universally unique identifier (UUID), version 5. See RFC 4122","type":"string"},"delegatee":{"pattern":"^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$","description":"String representation of an Universally unique identifier (UUID), version 5. See RFC 4122","type":"string"},"delegatorType":{"type":"string"}}}}}}}}}}},"400":{"description":"The page number is negative.","content":{"application/json":{"example":{"ErrorCode":"BadRequest","Message":"An invalid request was made - Parameter 'page' cannot be negative","ErrorDetail":[{"Key":"message","Value":"Parameter 'page' cannot be negative."}],"ValidationError":[]},"schema":{"type":"string"}}}},"401":{"description":""},"404":{"description":"","content":{"text/xml":{"schema":{"example":"<ns6:ResponseError xmlns:cec=\"urn:oasis:names:specification:ubl:schema:xsd:CommonExtensionComponents-2\"\n                   xmlns:cac=\"urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2\"\n                   xmlns:cbc=\"urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2\"\n                   xmlns:ns6=\"http://tradeshift.com/api/1.0\"\n                   xmlns:ns20=\"urn:oasis:names:specification:ubl:schema:xsd:OrderResponseSimple-2\"\n                   xmlns:ns8=\"urn:oasis:names:specification:ubl:schema:xsd:ApplicationResponse-2\"\n                   xmlns:ns7=\"http://tradeshift.com/api/2.0\"\n                   xmlns:ns13=\"urn:oasis:names:specification:ubl:schema:xsd:CreditNote-2\"\n                   xmlns:ns9=\"urn:oasis:names:specification:ubl:schema:xsd:OrderCancellation-2\"\n                   xmlns:ns12=\"urn:oasis:names:specification:ubl:schema:xsd:Quotation-2\"\n                   xmlns:ns11=\"urn:oasis:names:specification:ubl:schema:xsd:Invoice-2\"\n                   xmlns:ns22=\"urn:oasis:names:specification:ubl:schema:xsd:RequestForQuotation-2\"\n                   xmlns:ns10=\"urn:oasis:names:specification:ubl:schema:xsd:DespatchAdvice-2\"\n                   xmlns:ns21=\"urn:oasis:names:specification:ubl:schema:xsd:OrderResponse-2\"\n                   xmlns:ns17=\"urn:oasis:names:specification:ubl:schema:xsd:RemittanceAdvice-2\"\n                   xmlns:ns16=\"urn:oasis:names:specification:ubl:schema:xsd:Reminder-2\"\n                   xmlns:ns15=\"urn:oasis:names:specification:ubl:schema:xsd:OrderChange-2\"\n                   xmlns:ns14=\"urn:oasis:names:specification:ubl:schema:xsd:Order-2\"\n                   xmlns:ns19=\"urn:oasis:names:specification:ubl:schema:xsd:Catalogue-2\"\n                   xmlns:ts=\"http://tradeshift.com/api/public/1.0\"\n                   xmlns:ns18=\"urn:oasis:names:specification:ubl:schema:xsd:ReceiptAdvice-2\">\n    <ns6:ErrorCode>ResourceNotFound</ns6:ErrorCode>\n    <ns6:Message>Error&amp;#x3a; ResourceNotFound&amp;#x3a; The object did not exist</ns6:Message>\n    <ns6:RequestId>fff29544-8039-499f-91c5-b3c9e4e3d8b1</ns6:RequestId>\n</ns6:ResponseError>\n"}}}}},"description":"Get a paginated list of assignments filtered by the following query parameters. The search will be performed on assignments from the current branch and child branches.\n","operationId":"get-rest-external-assignments","parameters":[{"name":"companyid","in":"query","description":"Company (tenant) UUID used to filter assignments.","schema":{"type":"string"}},{"name":"assigneeids","in":"query","description":"List of  UUIDs of assignees, used to filter assignments.","schema":{"type":"string"}},{"name":"with_tags","in":"query","description":"List of strings representing tags to be used to filter assignments.","schema":{"type":"string"}},{"name":"without_tags","in":"query","description":"List of strings representing tags to be used to exclude assignments.","schema":{"type":"string"}},{"name":"status","in":"query","description":"List of statuses to be used to filter assignment (e.g. OPEN, CLOSED, WAITING_FOR_ASSIGNEES)","schema":{"type":"string"}},{"name":"type","in":"query","description":"String representing a type used to filter assignments.","schema":{"type":"string"}},{"name":"type_category","in":"query","description":"String representing a type category(a collection of assignment types)","schema":{"type":"string"}},{"name":"created_from","in":"query","description":"Datetime used to get assignments created after this date.","schema":{"type":"string"}},{"name":"created_to","in":"query","description":"Datetime used to get assignments created before this date.","schema":{"type":"string"}},{"name":"modified_from","in":"query","description":"Datetime used to get assignments modified after this date.","schema":{"type":"string"}},{"name":"modified_to","in":"query","description":"Datetime used to get assignments modified before this date.","schema":{"type":"string"}},{"name":"subjectid","in":"query","description":"Represents a free form identifier ( usually a document UUID ) of the subject the assignment is referring to and can be used to search assignments by.\n","schema":{"type":"string"}},{"name":"externalid","in":"query","description":"Free form string representing a custom client identifier which can be used later to search assignments by. Assignments service makes no uniqueness validation on this identifier.\n","schema":{"type":"string"}},{"name":"page","in":"query","description":"Number representing the page to be return from the paginated result-set.","schema":{"default":0,"type":"integer"}},{"name":"limit","in":"query","description":"The number of assignments displayed per page.","schema":{"default":20,"type":"integer"}},{"name":"sortby","in":"query","description":"The sorting field.","schema":{"type":"string"}},{"name":"direction","in":"query","description":"The sorting direction.","schema":{"type":"string"}}],"x-annotation-dx-category":"assignments-find","summary":"find assignments","tags":["dx-category--assignments-find"]},"post":{"responses":{"201":{"description":"&nbsp; The assignment was successfully saved. <br> &nbsp; The companyId for the new assignment is X-Tradeshift-TenantId header. <br> &nbsp; The createdBy property is the user in X-Tradeshift-ActorId header. <br> &nbsp; If the assignee list has some invalid assignees or some that are not members of the current branch, those will be ignored and only the valid users (active or inactive) will be saved. <br> &nbsp; Furthermore, if there is any auto-assignment available for the provided assignees, these will be added as delegates or assignees. <br/>\n","content":{"application/json":{"example":{"id":"a60b2008-8872-4620-8ed2-410ce5640fb9","externalId":"External-Id","subjectId":"360b2008-8872-4620-8ed2-410ce5640fb0","app":"APVerification","createdBy":"260b2008-8872-4620-8ed2-410ce5640fb3","assigneeIds":["12067d82-1308-4fd1-9d0b-12eafe99c4cd"],"companyId":"3fba6061-b51e-49bb-8c08-6cf6d28a304a","tags":["A tag","Another tag"],"type":"A type","createdAt":"2018-10-25T16:40:31.795+03:00","modifiedAt":"2018-10-25T16:40:31.795+03:00","outcome":"An outcome","status":"CLOSED","modifiedBy":"12067d82-1308-4fd1-9d0b-12eafe99c4cd","comment":"A comment","context":{"format":"App.Tradeshift","context":{}}},"schema":{"title":"Tradeshift Public API 1.0 - Assignment","required":["id","subjectId","type"],"type":"object","additionalProperties":false,"properties":{"id":{"pattern":"^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$","description":"String representation of an Universally unique identifier (UUID), version 5. See RFC 4122","type":"string"},"subjectId":{"pattern":"^.{1,255}$","type":"string"},"app":{"pattern":"^.{1,255}$","type":"string"},"createdBy":{"pattern":"^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$","description":"String representation of an Universally unique identifier (UUID), version 5. See RFC 4122","type":"string"},"assigneeIds":{"uniqueItems":true,"type":"array","additionalProperties":false,"items":{"pattern":"^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$","description":"String representation of an Universally unique identifier (UUID), version 5. See RFC 4122","type":"string"}},"companyId":{"pattern":"^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$","description":"String representation of an Universally unique identifier (UUID), version 5. See RFC 4122","type":"string"},"tags":{"minItems":0,"uniqueItems":true,"type":"array","additionalProperties":false,"items":{"type":"string"}},"type":{"pattern":"^.{1,255}$","type":"string"},"comment":{"type":"string"},"outcome":{"type":"string"},"status":{"type":"string"},"externalId":{"pattern":"^.{1,255}$","type":"string"},"modifiedBy":{"pattern":"^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$","description":"String representation of an Universally unique identifier (UUID), version 5. See RFC 4122","type":"string"},"createdAt":{"pattern":"^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}(\\.\\d{3})?(Z|(\\+|\\-)[0-9]{2}:[0-9]{2})","description":"ISO8601 formatted DateTime in UTC timezone, fx 2014-12-09T16:11:53Z with optionally .001 for milliseconds.","type":"string"},"modifiedAt":{"pattern":"^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}(\\.\\d{3})?(Z|(\\+|\\-)[0-9]{2}:[0-9]{2})","description":"ISO8601 formatted DateTime in UTC timezone, fx 2014-12-09T16:11:53Z with optionally .001 for milliseconds.","type":"string"},"context":{"type":"object"},"delegations":{"uniqueItems":true,"type":"array","items":{"required":["delegator","delegatee"],"type":"object","properties":{"delegator":{"pattern":"^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$","description":"String representation of an Universally unique identifier (UUID), version 5. See RFC 4122","type":"string"},"delegatee":{"pattern":"^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$","description":"String representation of an Universally unique identifier (UUID), version 5. See RFC 4122","type":"string"},"delegatorType":{"type":"string"}}}}}}}}},"400":{"description":"Invalid input. The response will contain a list of one or more validation errors.","content":{"application/json":{"schema":{"type":"string"}}}},"401":{"description":""},"404":{"description":"","content":{"text/xml":{"schema":{"example":"<ns6:ResponseError xmlns:cec=\"urn:oasis:names:specification:ubl:schema:xsd:CommonExtensionComponents-2\"\n                   xmlns:cac=\"urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2\"\n                   xmlns:cbc=\"urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2\"\n                   xmlns:ns6=\"http://tradeshift.com/api/1.0\"\n                   xmlns:ns20=\"urn:oasis:names:specification:ubl:schema:xsd:OrderResponseSimple-2\"\n                   xmlns:ns8=\"urn:oasis:names:specification:ubl:schema:xsd:ApplicationResponse-2\"\n                   xmlns:ns7=\"http://tradeshift.com/api/2.0\"\n                   xmlns:ns13=\"urn:oasis:names:specification:ubl:schema:xsd:CreditNote-2\"\n                   xmlns:ns9=\"urn:oasis:names:specification:ubl:schema:xsd:OrderCancellation-2\"\n                   xmlns:ns12=\"urn:oasis:names:specification:ubl:schema:xsd:Quotation-2\"\n                   xmlns:ns11=\"urn:oasis:names:specification:ubl:schema:xsd:Invoice-2\"\n                   xmlns:ns22=\"urn:oasis:names:specification:ubl:schema:xsd:RequestForQuotation-2\"\n                   xmlns:ns10=\"urn:oasis:names:specification:ubl:schema:xsd:DespatchAdvice-2\"\n                   xmlns:ns21=\"urn:oasis:names:specification:ubl:schema:xsd:OrderResponse-2\"\n                   xmlns:ns17=\"urn:oasis:names:specification:ubl:schema:xsd:RemittanceAdvice-2\"\n                   xmlns:ns16=\"urn:oasis:names:specification:ubl:schema:xsd:Reminder-2\"\n                   xmlns:ns15=\"urn:oasis:names:specification:ubl:schema:xsd:OrderChange-2\"\n                   xmlns:ns14=\"urn:oasis:names:specification:ubl:schema:xsd:Order-2\"\n                   xmlns:ns19=\"urn:oasis:names:specification:ubl:schema:xsd:Catalogue-2\"\n                   xmlns:ts=\"http://tradeshift.com/api/public/1.0\"\n                   xmlns:ns18=\"urn:oasis:names:specification:ubl:schema:xsd:ReceiptAdvice-2\">\n    <ns6:ErrorCode>ResourceNotFound</ns6:ErrorCode>\n    <ns6:Message>Error&amp;#x3a; ResourceNotFound&amp;#x3a; The object did not exist</ns6:Message>\n    <ns6:RequestId>fff29544-8039-499f-91c5-b3c9e4e3d8b1</ns6:RequestId>\n</ns6:ResponseError>\n"}}}},"500":{"description":"&nbsp; A default assignee is absent, invalid or inactive or problems have occurred while saving in the DB.<br> &nbsp; When it indicates problems regarding default assignee, it returns a response body with the ErrorCode \"AbsentDefaultAssignee\" or \"InvalidDefaultAssignee\" when the default assignee is invalid or inactive. This error occurs only when no assignee is provided or none of the provided assignees one are valid and members of the current branch.\n","content":{"application/json":{"example":{"ErrorCode":"AbsentDefaultAssignee","Message":"Default assignee is absent. - Default assignee is absent.","ErrorDetail":[],"ValidationError":[]},"schema":{"type":"string"}}}}},"description":"Creates a new assignment. <br> It must have the following mandatory JSON nodes in the request body: <ul> <li>type</li> <li>subjectId</li> </ul> The list of assigneeIds, if provided, must contain at least one valid user or user group. <br/> If no assignees are provided or all provided are missing/invalid/are not members of the current branch, the API will return an error(no default assignee logic is used).The assignees can be users or teams.<br> Also, for the provided assignees, auto-assignees and delegations will be added to the assignment, if any. <br/>\n","operationId":"post-rest-external-assignments","requestBody":{"content":{"application/json":{"example":{"type":"DOCUMENT","subjectId":"360b2008-8872-4620-8ed2-410ce5640fb0","externalId":"External-Id","assigneeIds":["12067d82-1308-4fd1-9d0b-12eafe99c4cd","ef9725fc-bc4e-4b6c-aa87-26d3a0f334e4"],"app":"APVerification","assignerId":"6b380d88-050a-4274-a8a4-de815e36c3cf","tags":["A tag","Another tag"],"context":{"format":"App.Tradeshift","context":{}}},"schema":{"title":"Tradeshift Public API 1.0 - Assignment","required":["type","subjectId"],"type":"object","additionalProperties":false,"properties":{"type":{"pattern":"^.{1,255}$","type":"string"},"subjectId":{"pattern":"^.{1,255}$","type":"string"},"assigneeIds":{"uniqueItems":true,"type":"array","additionalProperties":false,"items":{"pattern":"^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$","description":"String representation of an Universally unique identifier (UUID), version 5. See RFC 4122","type":"string"}},"externalId":{"pattern":"^.{1,255}$","type":"string"},"app":{"pattern":"^.{1,255}$","type":"string"},"comment":{"type":"string"},"assignerId":{"pattern":"^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$","description":"String representation of an Universally unique identifier (UUID), version 5. See RFC 4122","type":"string"},"tags":{"minItems":0,"uniqueItems":true,"type":"array","additionalProperties":false,"items":{"type":"string"}},"context":{"type":"object"}}}}},"required":true},"parameters":[],"x-annotation-dx-category":"assignments-create","summary":"create assignment","tags":["dx-category--assignments-create"]}},"/rest/external/assignments/{id}":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"An UUID representing the assignment id."}],"get":{"responses":{"200":{"description":"Successfully returns the assignment with the given id.","content":{"application/json":{"example":{"id":"a60b2008-8872-4620-8ed2-410ce5640fb9","externalId":"External-Id","subjectId":"360b2008-8872-4620-8ed2-410ce5640fb0","app":"APVerification","createdBy":"260b2008-8872-4620-8ed2-410ce5640fb3","assigneeIds":["12067d82-1308-4fd1-9d0b-12eafe99c4cd"],"companyId":"3fba6061-b51e-49bb-8c08-6cf6d28a304a","tags":["A tag","Another tag"],"type":"A type","createdAt":"2018-10-25T16:40:31.795+03:00","modifiedAt":"2018-10-25T16:40:31.795+03:00","outcome":"An outcome","status":"CLOSED","modifiedBy":"12067d82-1308-4fd1-9d0b-12eafe99c4cd","comment":"A comment","context":{"format":"App.Tradeshift","context":{}}},"schema":{"title":"Tradeshift Public API 1.0 - Assignment","required":["id","subjectId","type"],"type":"object","additionalProperties":false,"properties":{"id":{"pattern":"^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$","description":"String representation of an Universally unique identifier (UUID), version 5. See RFC 4122","type":"string"},"subjectId":{"pattern":"^.{1,255}$","type":"string"},"app":{"pattern":"^.{1,255}$","type":"string"},"createdBy":{"pattern":"^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$","description":"String representation of an Universally unique identifier (UUID), version 5. See RFC 4122","type":"string"},"assigneeIds":{"uniqueItems":true,"type":"array","additionalProperties":false,"items":{"pattern":"^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$","description":"String representation of an Universally unique identifier (UUID), version 5. See RFC 4122","type":"string"}},"companyId":{"pattern":"^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$","description":"String representation of an Universally unique identifier (UUID), version 5. See RFC 4122","type":"string"},"tags":{"minItems":0,"uniqueItems":true,"type":"array","additionalProperties":false,"items":{"type":"string"}},"type":{"pattern":"^.{1,255}$","type":"string"},"comment":{"type":"string"},"outcome":{"type":"string"},"status":{"type":"string"},"externalId":{"pattern":"^.{1,255}$","type":"string"},"modifiedBy":{"pattern":"^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$","description":"String representation of an Universally unique identifier (UUID), version 5. See RFC 4122","type":"string"},"createdAt":{"pattern":"^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}(\\.\\d{3})?(Z|(\\+|\\-)[0-9]{2}:[0-9]{2})","description":"ISO8601 formatted DateTime in UTC timezone, fx 2014-12-09T16:11:53Z with optionally .001 for milliseconds.","type":"string"},"modifiedAt":{"pattern":"^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}(\\.\\d{3})?(Z|(\\+|\\-)[0-9]{2}:[0-9]{2})","description":"ISO8601 formatted DateTime in UTC timezone, fx 2014-12-09T16:11:53Z with optionally .001 for milliseconds.","type":"string"},"context":{"type":"object"},"delegations":{"uniqueItems":true,"type":"array","items":{"required":["delegator","delegatee"],"type":"object","properties":{"delegator":{"pattern":"^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$","description":"String representation of an Universally unique identifier (UUID), version 5. See RFC 4122","type":"string"},"delegatee":{"pattern":"^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$","description":"String representation of an Universally unique identifier (UUID), version 5. See RFC 4122","type":"string"},"delegatorType":{"type":"string"}}}}}}}}},"401":{"description":""},"403":{"description":"Current user does not have access to assignment","content":{"application/json":{"schema":{"type":"string"}}}},"404":{"description":"","content":{"text/xml":{"schema":{"example":"<ns6:ResponseError xmlns:cec=\"urn:oasis:names:specification:ubl:schema:xsd:CommonExtensionComponents-2\"\n                   xmlns:cac=\"urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2\"\n                   xmlns:cbc=\"urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2\"\n                   xmlns:ns6=\"http://tradeshift.com/api/1.0\"\n                   xmlns:ns20=\"urn:oasis:names:specification:ubl:schema:xsd:OrderResponseSimple-2\"\n                   xmlns:ns8=\"urn:oasis:names:specification:ubl:schema:xsd:ApplicationResponse-2\"\n                   xmlns:ns7=\"http://tradeshift.com/api/2.0\"\n                   xmlns:ns13=\"urn:oasis:names:specification:ubl:schema:xsd:CreditNote-2\"\n                   xmlns:ns9=\"urn:oasis:names:specification:ubl:schema:xsd:OrderCancellation-2\"\n                   xmlns:ns12=\"urn:oasis:names:specification:ubl:schema:xsd:Quotation-2\"\n                   xmlns:ns11=\"urn:oasis:names:specification:ubl:schema:xsd:Invoice-2\"\n                   xmlns:ns22=\"urn:oasis:names:specification:ubl:schema:xsd:RequestForQuotation-2\"\n                   xmlns:ns10=\"urn:oasis:names:specification:ubl:schema:xsd:DespatchAdvice-2\"\n                   xmlns:ns21=\"urn:oasis:names:specification:ubl:schema:xsd:OrderResponse-2\"\n                   xmlns:ns17=\"urn:oasis:names:specification:ubl:schema:xsd:RemittanceAdvice-2\"\n                   xmlns:ns16=\"urn:oasis:names:specification:ubl:schema:xsd:Reminder-2\"\n                   xmlns:ns15=\"urn:oasis:names:specification:ubl:schema:xsd:OrderChange-2\"\n                   xmlns:ns14=\"urn:oasis:names:specification:ubl:schema:xsd:Order-2\"\n                   xmlns:ns19=\"urn:oasis:names:specification:ubl:schema:xsd:Catalogue-2\"\n                   xmlns:ts=\"http://tradeshift.com/api/public/1.0\"\n                   xmlns:ns18=\"urn:oasis:names:specification:ubl:schema:xsd:ReceiptAdvice-2\">\n    <ns6:ErrorCode>ResourceNotFound</ns6:ErrorCode>\n    <ns6:Message>Error&amp;#x3a; ResourceNotFound&amp;#x3a; The object did not exist</ns6:Message>\n    <ns6:RequestId>fff29544-8039-499f-91c5-b3c9e4e3d8b1</ns6:RequestId>\n</ns6:ResponseError>\n"}}}}},"description":"Get the assignment with the given id. <br> The assignment will be visible if the company is the current branch or one of the child branches.\n","operationId":"get-rest-external-assignments-id","parameters":[],"x-annotation-dx-category":"assignments-find","summary":"find assignment","tags":["dx-category--assignments-find"]},"patch":{"responses":{"200":{"description":"&nbsp; The assignment was successfully updated are new assignment is returned <br>\n","content":{"application/json":{"example":{"id":"a60b2008-8872-4620-8ed2-410ce5640fb9","externalId":"External-Id","subjectId":"360b2008-8872-4620-8ed2-410ce5640fb0","app":"APVerification","createdBy":"260b2008-8872-4620-8ed2-410ce5640fb3","assigneeIds":["12067d82-1308-4fd1-9d0b-12eafe99c4cd"],"companyId":"3fba6061-b51e-49bb-8c08-6cf6d28a304a","tags":["A tag","Another tag"],"type":"A type","createdAt":"2018-10-25T16:40:31.795+03:00","modifiedAt":"2018-10-25T16:40:31.795+03:00","outcome":"An outcome","status":"CLOSED","modifiedBy":"12067d82-1308-4fd1-9d0b-12eafe99c4cd","comment":"A comment","context":{"format":"App.Tradeshift","context":{}}},"schema":{"title":"Tradeshift Public API 1.0 - Assignment","required":["id","subjectId","type"],"type":"object","additionalProperties":false,"properties":{"id":{"pattern":"^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$","description":"String representation of an Universally unique identifier (UUID), version 5. See RFC 4122","type":"string"},"subjectId":{"pattern":"^.{1,255}$","type":"string"},"app":{"pattern":"^.{1,255}$","type":"string"},"createdBy":{"pattern":"^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$","description":"String representation of an Universally unique identifier (UUID), version 5. See RFC 4122","type":"string"},"assigneeIds":{"uniqueItems":true,"type":"array","additionalProperties":false,"items":{"pattern":"^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$","description":"String representation of an Universally unique identifier (UUID), version 5. See RFC 4122","type":"string"}},"companyId":{"pattern":"^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$","description":"String representation of an Universally unique identifier (UUID), version 5. See RFC 4122","type":"string"},"tags":{"minItems":0,"uniqueItems":true,"type":"array","additionalProperties":false,"items":{"type":"string"}},"type":{"pattern":"^.{1,255}$","type":"string"},"comment":{"type":"string"},"outcome":{"type":"string"},"status":{"type":"string"},"externalId":{"pattern":"^.{1,255}$","type":"string"},"modifiedBy":{"pattern":"^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$","description":"String representation of an Universally unique identifier (UUID), version 5. See RFC 4122","type":"string"},"createdAt":{"pattern":"^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}(\\.\\d{3})?(Z|(\\+|\\-)[0-9]{2}:[0-9]{2})","description":"ISO8601 formatted DateTime in UTC timezone, fx 2014-12-09T16:11:53Z with optionally .001 for milliseconds.","type":"string"},"modifiedAt":{"pattern":"^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}(\\.\\d{3})?(Z|(\\+|\\-)[0-9]{2}:[0-9]{2})","description":"ISO8601 formatted DateTime in UTC timezone, fx 2014-12-09T16:11:53Z with optionally .001 for milliseconds.","type":"string"},"context":{"type":"object"},"delegations":{"uniqueItems":true,"type":"array","items":{"required":["delegator","delegatee"],"type":"object","properties":{"delegator":{"pattern":"^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$","description":"String representation of an Universally unique identifier (UUID), version 5. See RFC 4122","type":"string"},"delegatee":{"pattern":"^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$","description":"String representation of an Universally unique identifier (UUID), version 5. See RFC 4122","type":"string"},"delegatorType":{"type":"string"}}}}}}}}},"400":{"description":"Invalid input. The response will contain a list of one or more validation errors.","content":{"application/json":{"schema":{"type":"string"}}}},"401":{"description":""},"403":{"description":"Current user does not have access to assignment","content":{"application/json":{"schema":{"type":"string"}}}},"404":{"description":"","content":{"text/xml":{"schema":{"example":"<ns6:ResponseError xmlns:cec=\"urn:oasis:names:specification:ubl:schema:xsd:CommonExtensionComponents-2\"\n                   xmlns:cac=\"urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2\"\n                   xmlns:cbc=\"urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2\"\n                   xmlns:ns6=\"http://tradeshift.com/api/1.0\"\n                   xmlns:ns20=\"urn:oasis:names:specification:ubl:schema:xsd:OrderResponseSimple-2\"\n                   xmlns:ns8=\"urn:oasis:names:specification:ubl:schema:xsd:ApplicationResponse-2\"\n                   xmlns:ns7=\"http://tradeshift.com/api/2.0\"\n                   xmlns:ns13=\"urn:oasis:names:specification:ubl:schema:xsd:CreditNote-2\"\n                   xmlns:ns9=\"urn:oasis:names:specification:ubl:schema:xsd:OrderCancellation-2\"\n                   xmlns:ns12=\"urn:oasis:names:specification:ubl:schema:xsd:Quotation-2\"\n                   xmlns:ns11=\"urn:oasis:names:specification:ubl:schema:xsd:Invoice-2\"\n                   xmlns:ns22=\"urn:oasis:names:specification:ubl:schema:xsd:RequestForQuotation-2\"\n                   xmlns:ns10=\"urn:oasis:names:specification:ubl:schema:xsd:DespatchAdvice-2\"\n                   xmlns:ns21=\"urn:oasis:names:specification:ubl:schema:xsd:OrderResponse-2\"\n                   xmlns:ns17=\"urn:oasis:names:specification:ubl:schema:xsd:RemittanceAdvice-2\"\n                   xmlns:ns16=\"urn:oasis:names:specification:ubl:schema:xsd:Reminder-2\"\n                   xmlns:ns15=\"urn:oasis:names:specification:ubl:schema:xsd:OrderChange-2\"\n                   xmlns:ns14=\"urn:oasis:names:specification:ubl:schema:xsd:Order-2\"\n                   xmlns:ns19=\"urn:oasis:names:specification:ubl:schema:xsd:Catalogue-2\"\n                   xmlns:ts=\"http://tradeshift.com/api/public/1.0\"\n                   xmlns:ns18=\"urn:oasis:names:specification:ubl:schema:xsd:ReceiptAdvice-2\">\n    <ns6:ErrorCode>ResourceNotFound</ns6:ErrorCode>\n    <ns6:Message>Error&amp;#x3a; ResourceNotFound&amp;#x3a; The object did not exist</ns6:Message>\n    <ns6:RequestId>fff29544-8039-499f-91c5-b3c9e4e3d8b1</ns6:RequestId>\n</ns6:ResponseError>\n"}}}},"500":{"description":"&nbsp; The service failed unexpectedly while updating the assignment.\n","content":{"application/json":{"example":{"ErrorCode":"AbsentDefaultAssignee","Message":"Default assignee is absent. - Default assignee is absent.","ErrorDetail":[],"ValidationError":[]},"schema":{"type":"string"}}}}},"description":"Updates an assignment with assignees, tags, comment, outcome. The new assignees will be added to the existing ones and the duplicates will be removed. The new tags will be added to the existing ones and the duplicates will be removed. The comment will replace the existing one. The outcome will replace the existing one.\n","operationId":"patch-rest-external-assignments-id","requestBody":{"content":{"application/json":{"example":{"addAssigneeIds":["e6aaeb31-b33d-40a1-bd05-a4d5bc1410ea","12067d82-1308-4fd1-9d0b-12eafe99c4cd"],"addTags":["tag1","tag2"],"updateComment":"comment","updateOutcome":"outcome"},"schema":{"title":"Tradeshift Public API 1.0 - Assignment","type":"object","additionalProperties":false,"properties":{"addAssigneeIds":{"minItems":1,"uniqueItems":true,"type":"array","additionalProperties":false,"items":{"pattern":"^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$","description":"String representation of an Universally unique identifier (UUID), version 5. See RFC 4122","type":"string"}},"addTags":{"minItems":0,"uniqueItems":true,"type":"array","additionalProperties":false,"items":{"type":"string"}},"updateComment":{"type":"string"},"updateOutcome":{"pattern":"^.{1,255}$","type":"string"},"context":{"type":"object"}},"required":["addAssigneeIds","addTags","updateComment","updateOutcome","context"]}}},"required":true},"parameters":[],"x-annotation-dx-category":"assignments-update","summary":"update assignment","tags":["dx-category--assignments-update"]}},"/rest/external/assignments/{id}/close":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"An UUID representing the assignment id."}],"put":{"responses":{"204":{"description":"The assignment is successfully closed."},"400":{"description":"The assignment cannot be found or closed.","content":{"application/json":{"example":{"ErrorCode":"BadRequest","Message":"Could not resolve type nonExistentType","ErrorDetail":[{"Key":"message","Value":"Could not resolve type nonExistentType"},{"Key":"stacktrace","Value":"com.tradeshift.commons.exception.BadRequestException: Could not resolve type nonExistentType\n\tat com.tradeshift.coding.rest.CodingResource.getCodingLists(CodingResource.java:85)\n\t"}],"ValidationError":[],"RequestId":"2c941598-489c-4fac-8543-03cb921feaf7"},"schema":{"type":"string"}}}},"401":{"description":""},"403":{"description":"Current user does not have access to assignment","content":{"application/json":{"schema":{"type":"string"}}}},"404":{"description":"","content":{"text/xml":{"schema":{"example":"<ns6:ResponseError xmlns:cec=\"urn:oasis:names:specification:ubl:schema:xsd:CommonExtensionComponents-2\"\n                   xmlns:cac=\"urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2\"\n                   xmlns:cbc=\"urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2\"\n                   xmlns:ns6=\"http://tradeshift.com/api/1.0\"\n                   xmlns:ns20=\"urn:oasis:names:specification:ubl:schema:xsd:OrderResponseSimple-2\"\n                   xmlns:ns8=\"urn:oasis:names:specification:ubl:schema:xsd:ApplicationResponse-2\"\n                   xmlns:ns7=\"http://tradeshift.com/api/2.0\"\n                   xmlns:ns13=\"urn:oasis:names:specification:ubl:schema:xsd:CreditNote-2\"\n                   xmlns:ns9=\"urn:oasis:names:specification:ubl:schema:xsd:OrderCancellation-2\"\n                   xmlns:ns12=\"urn:oasis:names:specification:ubl:schema:xsd:Quotation-2\"\n                   xmlns:ns11=\"urn:oasis:names:specification:ubl:schema:xsd:Invoice-2\"\n                   xmlns:ns22=\"urn:oasis:names:specification:ubl:schema:xsd:RequestForQuotation-2\"\n                   xmlns:ns10=\"urn:oasis:names:specification:ubl:schema:xsd:DespatchAdvice-2\"\n                   xmlns:ns21=\"urn:oasis:names:specification:ubl:schema:xsd:OrderResponse-2\"\n                   xmlns:ns17=\"urn:oasis:names:specification:ubl:schema:xsd:RemittanceAdvice-2\"\n                   xmlns:ns16=\"urn:oasis:names:specification:ubl:schema:xsd:Reminder-2\"\n                   xmlns:ns15=\"urn:oasis:names:specification:ubl:schema:xsd:OrderChange-2\"\n                   xmlns:ns14=\"urn:oasis:names:specification:ubl:schema:xsd:Order-2\"\n                   xmlns:ns19=\"urn:oasis:names:specification:ubl:schema:xsd:Catalogue-2\"\n                   xmlns:ts=\"http://tradeshift.com/api/public/1.0\"\n                   xmlns:ns18=\"urn:oasis:names:specification:ubl:schema:xsd:ReceiptAdvice-2\">\n    <ns6:ErrorCode>ResourceNotFound</ns6:ErrorCode>\n    <ns6:Message>Error&amp;#x3a; ResourceNotFound&amp;#x3a; The object did not exist</ns6:Message>\n    <ns6:RequestId>fff29544-8039-499f-91c5-b3c9e4e3d8b1</ns6:RequestId>\n</ns6:ResponseError>\n"}}}}},"description":"Update the status of the assignment to CLOSED. <br> The assignment can be closed if it is in OPEN state.\n","operationId":"put-rest-external-assignments-id-close","parameters":[],"x-annotation-dx-category":"assignments-update","summary":"update assignment status to CLOSED","tags":["dx-category--assignments-update"]}},"/rest/external/assignments/{id}/comment":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"An UUID representing the assignment id."}],"put":{"responses":{"204":{"description":"The comment is successfully updated."},"400":{"description":"The assignment cannot be found or updated.","content":{"application/json":{"example":{"ErrorCode":"BadRequest","Message":"Could not resolve type nonExistentType","ErrorDetail":[{"Key":"message","Value":"Could not resolve type nonExistentType"},{"Key":"stacktrace","Value":"com.tradeshift.commons.exception.BadRequestException: Could not resolve type nonExistentType\n\tat com.tradeshift.coding.rest.CodingResource.getCodingLists(CodingResource.java:85)\n\t"}],"ValidationError":[],"RequestId":"2c941598-489c-4fac-8543-03cb921feaf7"},"schema":{"type":"string"}}}},"401":{"description":""},"403":{"description":"Current user does not have access to assignment","content":{"application/json":{"schema":{"type":"string"}}}},"404":{"description":"","content":{"text/xml":{"schema":{"example":"<ns6:ResponseError xmlns:cec=\"urn:oasis:names:specification:ubl:schema:xsd:CommonExtensionComponents-2\"\n                   xmlns:cac=\"urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2\"\n                   xmlns:cbc=\"urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2\"\n                   xmlns:ns6=\"http://tradeshift.com/api/1.0\"\n                   xmlns:ns20=\"urn:oasis:names:specification:ubl:schema:xsd:OrderResponseSimple-2\"\n                   xmlns:ns8=\"urn:oasis:names:specification:ubl:schema:xsd:ApplicationResponse-2\"\n                   xmlns:ns7=\"http://tradeshift.com/api/2.0\"\n                   xmlns:ns13=\"urn:oasis:names:specification:ubl:schema:xsd:CreditNote-2\"\n                   xmlns:ns9=\"urn:oasis:names:specification:ubl:schema:xsd:OrderCancellation-2\"\n                   xmlns:ns12=\"urn:oasis:names:specification:ubl:schema:xsd:Quotation-2\"\n                   xmlns:ns11=\"urn:oasis:names:specification:ubl:schema:xsd:Invoice-2\"\n                   xmlns:ns22=\"urn:oasis:names:specification:ubl:schema:xsd:RequestForQuotation-2\"\n                   xmlns:ns10=\"urn:oasis:names:specification:ubl:schema:xsd:DespatchAdvice-2\"\n                   xmlns:ns21=\"urn:oasis:names:specification:ubl:schema:xsd:OrderResponse-2\"\n                   xmlns:ns17=\"urn:oasis:names:specification:ubl:schema:xsd:RemittanceAdvice-2\"\n                   xmlns:ns16=\"urn:oasis:names:specification:ubl:schema:xsd:Reminder-2\"\n                   xmlns:ns15=\"urn:oasis:names:specification:ubl:schema:xsd:OrderChange-2\"\n                   xmlns:ns14=\"urn:oasis:names:specification:ubl:schema:xsd:Order-2\"\n                   xmlns:ns19=\"urn:oasis:names:specification:ubl:schema:xsd:Catalogue-2\"\n                   xmlns:ts=\"http://tradeshift.com/api/public/1.0\"\n                   xmlns:ns18=\"urn:oasis:names:specification:ubl:schema:xsd:ReceiptAdvice-2\">\n    <ns6:ErrorCode>ResourceNotFound</ns6:ErrorCode>\n    <ns6:Message>Error&amp;#x3a; ResourceNotFound&amp;#x3a; The object did not exist</ns6:Message>\n    <ns6:RequestId>fff29544-8039-499f-91c5-b3c9e4e3d8b1</ns6:RequestId>\n</ns6:ResponseError>\n"}}}}},"description":"Update the comment of the assignment. <br> You should put the new comment of the assignment in the request body as plain text.\n","operationId":"put-rest-external-assignments-id-comment","requestBody":{"content":{"text/plain":{"example":"A comment","schema":{"type":"string"}}},"required":true},"parameters":[],"x-annotation-dx-category":"assignments-update","summary":"update assignment comment","tags":["dx-category--assignments-update"]}},"/rest/external/assignments/{id}/reassign/{assigneeid}":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"An UUID representing the assignment id."},{"name":"assigneeid","in":"path","required":true,"schema":{"type":"string"},"description":"An UUID representing the id of the new assignee."}],"post":{"responses":{"200":{"description":"&nbsp; The assignment is successfully reassigned.\n","content":{"application/json":{"example":{"id":"a60b2008-8872-4620-8ed2-410ce5640fb9","externalId":"External-Id","subjectId":"360b2008-8872-4620-8ed2-410ce5640fb0","app":"APVerification","createdBy":"260b2008-8872-4620-8ed2-410ce5640fb3","assigneeIds":["12067d82-1308-4fd1-9d0b-12eafe99c4cd"],"companyId":"3fba6061-b51e-49bb-8c08-6cf6d28a304a","tags":["A tag","Another tag"],"type":"A type","createdAt":"2018-10-25T16:40:31.795+03:00","modifiedAt":"2018-10-25T16:40:31.795+03:00","outcome":"An outcome","status":"CLOSED","modifiedBy":"12067d82-1308-4fd1-9d0b-12eafe99c4cd","comment":"A comment","context":{"format":"App.Tradeshift","context":{}}},"schema":{"title":"Tradeshift Public API 1.0 - Assignment","required":["id","subjectId","type"],"type":"object","additionalProperties":false,"properties":{"id":{"pattern":"^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$","description":"String representation of an Universally unique identifier (UUID), version 5. See RFC 4122","type":"string"},"subjectId":{"pattern":"^.{1,255}$","type":"string"},"app":{"pattern":"^.{1,255}$","type":"string"},"createdBy":{"pattern":"^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$","description":"String representation of an Universally unique identifier (UUID), version 5. See RFC 4122","type":"string"},"assigneeIds":{"uniqueItems":true,"type":"array","additionalProperties":false,"items":{"pattern":"^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$","description":"String representation of an Universally unique identifier (UUID), version 5. See RFC 4122","type":"string"}},"companyId":{"pattern":"^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$","description":"String representation of an Universally unique identifier (UUID), version 5. See RFC 4122","type":"string"},"tags":{"minItems":0,"uniqueItems":true,"type":"array","additionalProperties":false,"items":{"type":"string"}},"type":{"pattern":"^.{1,255}$","type":"string"},"comment":{"type":"string"},"outcome":{"type":"string"},"status":{"type":"string"},"externalId":{"pattern":"^.{1,255}$","type":"string"},"modifiedBy":{"pattern":"^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$","description":"String representation of an Universally unique identifier (UUID), version 5. See RFC 4122","type":"string"},"createdAt":{"pattern":"^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}(\\.\\d{3})?(Z|(\\+|\\-)[0-9]{2}:[0-9]{2})","description":"ISO8601 formatted DateTime in UTC timezone, fx 2014-12-09T16:11:53Z with optionally .001 for milliseconds.","type":"string"},"modifiedAt":{"pattern":"^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}(\\.\\d{3})?(Z|(\\+|\\-)[0-9]{2}:[0-9]{2})","description":"ISO8601 formatted DateTime in UTC timezone, fx 2014-12-09T16:11:53Z with optionally .001 for milliseconds.","type":"string"},"context":{"type":"object"},"delegations":{"uniqueItems":true,"type":"array","items":{"required":["delegator","delegatee"],"type":"object","properties":{"delegator":{"pattern":"^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$","description":"String representation of an Universally unique identifier (UUID), version 5. See RFC 4122","type":"string"},"delegatee":{"pattern":"^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$","description":"String representation of an Universally unique identifier (UUID), version 5. See RFC 4122","type":"string"},"delegatorType":{"type":"string"}}}}}}}}},"204":{"description":"The new assignee is the current assignee."},"400":{"description":"The assignment is in CLOSED state.","content":{"application/json":{"example":{"ErrorCode":"BadRequest","Message":"Could not resolve type nonExistentType","ErrorDetail":[{"Key":"message","Value":"Could not resolve type nonExistentType"},{"Key":"stacktrace","Value":"com.tradeshift.commons.exception.BadRequestException: Could not resolve type nonExistentType\n\tat com.tradeshift.coding.rest.CodingResource.getCodingLists(CodingResource.java:85)\n\t"}],"ValidationError":[],"RequestId":"2c941598-489c-4fac-8543-03cb921feaf7"},"schema":{"type":"string"}}}},"401":{"description":""},"404":{"description":"","content":{"text/xml":{"schema":{"example":"<ns6:ResponseError xmlns:cec=\"urn:oasis:names:specification:ubl:schema:xsd:CommonExtensionComponents-2\"\n                   xmlns:cac=\"urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2\"\n                   xmlns:cbc=\"urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2\"\n                   xmlns:ns6=\"http://tradeshift.com/api/1.0\"\n                   xmlns:ns20=\"urn:oasis:names:specification:ubl:schema:xsd:OrderResponseSimple-2\"\n                   xmlns:ns8=\"urn:oasis:names:specification:ubl:schema:xsd:ApplicationResponse-2\"\n                   xmlns:ns7=\"http://tradeshift.com/api/2.0\"\n                   xmlns:ns13=\"urn:oasis:names:specification:ubl:schema:xsd:CreditNote-2\"\n                   xmlns:ns9=\"urn:oasis:names:specification:ubl:schema:xsd:OrderCancellation-2\"\n                   xmlns:ns12=\"urn:oasis:names:specification:ubl:schema:xsd:Quotation-2\"\n                   xmlns:ns11=\"urn:oasis:names:specification:ubl:schema:xsd:Invoice-2\"\n                   xmlns:ns22=\"urn:oasis:names:specification:ubl:schema:xsd:RequestForQuotation-2\"\n                   xmlns:ns10=\"urn:oasis:names:specification:ubl:schema:xsd:DespatchAdvice-2\"\n                   xmlns:ns21=\"urn:oasis:names:specification:ubl:schema:xsd:OrderResponse-2\"\n                   xmlns:ns17=\"urn:oasis:names:specification:ubl:schema:xsd:RemittanceAdvice-2\"\n                   xmlns:ns16=\"urn:oasis:names:specification:ubl:schema:xsd:Reminder-2\"\n                   xmlns:ns15=\"urn:oasis:names:specification:ubl:schema:xsd:OrderChange-2\"\n                   xmlns:ns14=\"urn:oasis:names:specification:ubl:schema:xsd:Order-2\"\n                   xmlns:ns19=\"urn:oasis:names:specification:ubl:schema:xsd:Catalogue-2\"\n                   xmlns:ts=\"http://tradeshift.com/api/public/1.0\"\n                   xmlns:ns18=\"urn:oasis:names:specification:ubl:schema:xsd:ReceiptAdvice-2\">\n    <ns6:ErrorCode>ResourceNotFound</ns6:ErrorCode>\n    <ns6:Message>Error&amp;#x3a; ResourceNotFound&amp;#x3a; The object did not exist</ns6:Message>\n    <ns6:RequestId>fff29544-8039-499f-91c5-b3c9e4e3d8b1</ns6:RequestId>\n</ns6:ResponseError>\n"}}}},"500":{"description":"&nbsp; The default assignee is absent, invalid or inactive. <br> &nbsp; It returns a response body with the ErrorCode \"AbsentDefaultAssignee\" or \"InvalidDefaultAssignee\" when the default assignee is invalid or inactive.\n","content":{"application/json":{"example":{"ErrorCode":"AbsentDefaultAssignee","Message":"Default assignee is absent. - Default assignee is absent.","ErrorDetail":[],"ValidationError":[]},"schema":{"type":"string"}}}}},"description":"Reassign the assignment with the given id to the new assignee.\n","operationId":"post-rest-external-assignments-id-reassign-assigneeid","parameters":[],"x-annotation-dx-category":"assignments-reassign","summary":"reassign assignment","tags":["dx-category--assignments-reassign"]}},"/rest/external/assignments/assignees/{from_assigneeid}/reassignees/{to_assigneeid}":{"parameters":[{"name":"from_assigneeid","in":"path","required":true,"schema":{"type":"string"},"description":"An UUID representing the assignee id."},{"name":"to_assigneeid","in":"path","required":true,"schema":{"type":"string"},"description":"An UUID representing the reassignee id."}],"put":{"responses":{"201":{"description":"&nbsp; The assignment is successfully reassigned. <br> &nbsp; If the reassignee is not valid, active and member of the current branch, the assignments will be assigned to the default assignee and this action will be marked in the response body. <br> &nbsp; Excepting this case, the response does not have a body.\n","content":{"application/json":{"example":{"total":2,"items":[{"id":"460b2008-8872-4620-8ed2-410ce5640fb9","externalId":"external id","subjectId":"280b2305-8872-3620-9ed2-010ce5640fb7","app":"APVerification","createdBy":"760b2008-8872-4620-8ed2-410ce5640fb4","assigneeIds":["12067d82-1308-4fd1-9d0b-12eafe99c4cd"],"companyId":"3fba6061-b51e-49bb-8c08-6cf6d28a304a","tags":["A tag","Another tag"],"type":"DOCUMENT","createdAt":"2018-10-25T10:56:27.311+03:00","modifiedAt":"2018-10-25T10:56:27.311+03:00","outcome":"An outcome","status":"OPEN","modifiedBy":"12067d82-1308-4fd1-9d0b-12eafe99c4cd","comment":"Assigned to default assignee.","context":{"format":"App.Tradeshift","context":["freeJson"]}},{"id":"a60b2008-8872-4620-8ed2-410ce5640fb9","externalId":"external id","subjectId":"360b2008-8872-4620-8ed2-410ce5640fb0","app":"APVerification","createdBy":"260b2008-8872-4620-8ed2-410ce5640fb3","assigneeIds":["12067d82-1308-4fd1-9d0b-12eafe99c4cd"],"companyId":"3fba6061-b51e-49bb-8c08-6cf6d28a304a","tags":[],"type":"A type","createdAt":"2018-10-25T16:40:31.795+03:00","modifiedAt":"2018-10-25T16:40:31.795+03:00","outcome":"An outcome","status":"CLOSED","modifiedBy":"12067d82-1308-4fd1-9d0b-12eafe99c4cd","comment":"Assigned to default assignee.","context":{"format":"App.Tradeshift","context":{}}}],"empty":false,"firstItem":{"id":"460b2008-8872-4620-8ed2-410ce5640fb9","externalId":"External-Id","subjectId":"280b2305-8872-3620-9ed2-010ce5640fb7","app":"APVerification","createdBy":"760b2008-8872-4620-8ed2-410ce5640fb4","assigneeIds":["12067d82-1308-4fd1-9d0b-12eafe99c4cd"],"companyId":"3fba6061-b51e-49bb-8c08-6cf6d28a304a","tags":["A tag","Another tag"],"type":"DOCUMENT","createdAt":"2018-10-25T10:56:27.311+03:00","modifiedAt":"2018-10-25T10:56:27.311+03:00","outcome":"An outcome","status":"OPEN","modifiedBy":"12067d82-1308-4fd1-9d0b-12eafe99c4cd","comment":"Assigned to default assignee.","context":{"format":"App.Tradeshift","context":["freeJson"]}}},"schema":{"title":"Tradeshift Public API 1.0 - Assignments","required":["total","items","empty"],"type":"object","additionalProperties":false,"properties":{"total":{"minimum":0,"description":"The number of assignments returned for the query","type":"integer"},"items":{"minItems":0,"uniqueItems":true,"type":"array","additionalProperties":false,"items":{"required":["id","subjectId","type"],"type":"object","properties":{"id":{"pattern":"^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$","description":"String representation of an Universally unique identifier (UUID), version 5. See RFC 4122","type":"string"},"subjectId":{"pattern":"^.{1,255}$","type":"string"},"app":{"pattern":"^.{1,255}$","type":"string"},"createdBy":{"pattern":"^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$","description":"String representation of an Universally unique identifier (UUID), version 5. See RFC 4122","type":"string"},"assigneeIds":{"minItems":1,"uniqueItems":true,"type":"array","additionalProperties":false,"items":{"pattern":"^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$","description":"String representation of an Universally unique identifier (UUID), version 5. See RFC 4122","type":"string"}},"companyId":{"pattern":"^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$","description":"String representation of an Universally unique identifier (UUID), version 5. See RFC 4122","type":"string"},"tags":{"minItems":0,"uniqueItems":true,"type":"array","additionalProperties":false,"items":{"type":"string"}},"type":{"pattern":"^.{1,255}$","type":"string"},"modifiedBy":{"pattern":"^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$","description":"String representation of an Universally unique identifier (UUID), version 5. See RFC 4122","type":"string"},"createdAt":{"pattern":"^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}(\\.\\d{3})?(Z|(\\+|\\-)[0-9]{2}:[0-9]{2})","description":"ISO8601 formatted DateTime in UTC timezone, fx 2014-12-09T16:11:53Z with optionally .001 for milliseconds.","type":"string"},"externalId":{"pattern":"^.{1,255}$","type":"string"},"modifiedAt":{"pattern":"^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}(\\.\\d{3})?(Z|(\\+|\\-)[0-9]{2}:[0-9]{2})","description":"ISO8601 formatted DateTime in UTC timezone, fx 2014-12-09T16:11:53Z with optionally .001 for milliseconds.","type":"string"},"assignmentLogs":{"minItems":0,"uniqueItems":true,"type":"array","items":{"type":"object","properties":{"id":{"type":"integer"},"outcome":{"type":"string"},"externalId":{"pattern":"^.{1,255}$","type":"string"},"status":{"type":"string"},"comment":{"type":"string"},"tags":{"minItems":0,"uniqueItems":true,"type":"array","additionalProperties":false,"items":{"type":"string"}},"createdAt":{"pattern":"^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}(\\.\\d{3})?(Z|(\\+|\\-)[0-9]{2}:[0-9]{2})","description":"ISO8601 formatted DateTime in UTC timezone, fx 2014-12-09T16:11:53Z with optionally .001 for milliseconds.","type":"string"}},"required":["id","outcome","externalId","status","comment","tags","createdAt"]}},"context":{"type":"object"},"delegations":{"uniqueItems":true,"type":"array","items":{"required":["delegator","delegatee"],"type":"object","properties":{"delegator":{"pattern":"^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$","description":"String representation of an Universally unique identifier (UUID), version 5. See RFC 4122","type":"string"},"delegatee":{"pattern":"^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$","description":"String representation of an Universally unique identifier (UUID), version 5. See RFC 4122","type":"string"},"delegatorType":{"type":"string"}}}}}}},"empty":{"type":"boolean"},"firstItem":{"required":["id","subjectId","type"],"type":"object","properties":{"id":{"pattern":"^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$","description":"String representation of an Universally unique identifier (UUID), version 5. See RFC 4122","type":"string"},"subjectId":{"pattern":"^.{1,255}$","type":"string"},"app":{"pattern":"^.{1,255}$","type":"string"},"createdBy":{"pattern":"^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$","description":"String representation of an Universally unique identifier (UUID), version 5. See RFC 4122","type":"string"},"assigneeIds":{"minItems":1,"uniqueItems":true,"type":"array","additionalProperties":false,"items":{"pattern":"^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$","description":"String representation of an Universally unique identifier (UUID), version 5. See RFC 4122","type":"string"}},"companyId":{"pattern":"^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$","description":"String representation of an Universally unique identifier (UUID), version 5. See RFC 4122","type":"string"},"tags":{"minItems":0,"uniqueItems":true,"type":"array","additionalProperties":false,"items":{"type":"string"}},"type":{"pattern":"^.{1,255}$","type":"string"},"modifiedBy":{"pattern":"^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$","description":"String representation of an Universally unique identifier (UUID), version 5. See RFC 4122","type":"string"},"createdAt":{"pattern":"^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}(\\.\\d{3})?(Z|(\\+|\\-)[0-9]{2}:[0-9]{2})","description":"ISO8601 formatted DateTime in UTC timezone, fx 2014-12-09T16:11:53Z with optionally .001 for milliseconds.","type":"string"},"externalId":{"pattern":"^.{1,255}$","type":"string"},"modifiedAt":{"pattern":"^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}(\\.\\d{3})?(Z|(\\+|\\-)[0-9]{2}:[0-9]{2})","description":"ISO8601 formatted DateTime in UTC timezone, fx 2014-12-09T16:11:53Z with optionally .001 for milliseconds.","type":"string"},"assignmentLogs":{"minItems":0,"uniqueItems":true,"type":"array","items":{"type":"object","properties":{"id":{"type":"integer"},"outcome":{"type":"string"},"externalId":{"pattern":"^.{1,255}$","type":"string"},"status":{"type":"string"},"comment":{"type":"string"},"tags":{"minItems":0,"uniqueItems":true,"type":"array","additionalProperties":false,"items":{"type":"string"}},"createdAt":{"pattern":"^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}(\\.\\d{3})?(Z|(\\+|\\-)[0-9]{2}:[0-9]{2})","description":"ISO8601 formatted DateTime in UTC timezone, fx 2014-12-09T16:11:53Z with optionally .001 for milliseconds.","type":"string"}},"required":["id","outcome","externalId","status","comment","tags","createdAt"]}},"context":{"type":"object"},"delegations":{"uniqueItems":true,"type":"array","items":{"required":["delegator","delegatee"],"type":"object","properties":{"delegator":{"pattern":"^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$","description":"String representation of an Universally unique identifier (UUID), version 5. See RFC 4122","type":"string"},"delegatee":{"pattern":"^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$","description":"String representation of an Universally unique identifier (UUID), version 5. See RFC 4122","type":"string"},"delegatorType":{"type":"string"}}}}}}}}}}},"204":{"description":"Assigees are equal or no assignments are found."},"401":{"description":""},"404":{"description":"","content":{"text/xml":{"schema":{"example":"<ns6:ResponseError xmlns:cec=\"urn:oasis:names:specification:ubl:schema:xsd:CommonExtensionComponents-2\"\n                   xmlns:cac=\"urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2\"\n                   xmlns:cbc=\"urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2\"\n                   xmlns:ns6=\"http://tradeshift.com/api/1.0\"\n                   xmlns:ns20=\"urn:oasis:names:specification:ubl:schema:xsd:OrderResponseSimple-2\"\n                   xmlns:ns8=\"urn:oasis:names:specification:ubl:schema:xsd:ApplicationResponse-2\"\n                   xmlns:ns7=\"http://tradeshift.com/api/2.0\"\n                   xmlns:ns13=\"urn:oasis:names:specification:ubl:schema:xsd:CreditNote-2\"\n                   xmlns:ns9=\"urn:oasis:names:specification:ubl:schema:xsd:OrderCancellation-2\"\n                   xmlns:ns12=\"urn:oasis:names:specification:ubl:schema:xsd:Quotation-2\"\n                   xmlns:ns11=\"urn:oasis:names:specification:ubl:schema:xsd:Invoice-2\"\n                   xmlns:ns22=\"urn:oasis:names:specification:ubl:schema:xsd:RequestForQuotation-2\"\n                   xmlns:ns10=\"urn:oasis:names:specification:ubl:schema:xsd:DespatchAdvice-2\"\n                   xmlns:ns21=\"urn:oasis:names:specification:ubl:schema:xsd:OrderResponse-2\"\n                   xmlns:ns17=\"urn:oasis:names:specification:ubl:schema:xsd:RemittanceAdvice-2\"\n                   xmlns:ns16=\"urn:oasis:names:specification:ubl:schema:xsd:Reminder-2\"\n                   xmlns:ns15=\"urn:oasis:names:specification:ubl:schema:xsd:OrderChange-2\"\n                   xmlns:ns14=\"urn:oasis:names:specification:ubl:schema:xsd:Order-2\"\n                   xmlns:ns19=\"urn:oasis:names:specification:ubl:schema:xsd:Catalogue-2\"\n                   xmlns:ts=\"http://tradeshift.com/api/public/1.0\"\n                   xmlns:ns18=\"urn:oasis:names:specification:ubl:schema:xsd:ReceiptAdvice-2\">\n    <ns6:ErrorCode>ResourceNotFound</ns6:ErrorCode>\n    <ns6:Message>Error&amp;#x3a; ResourceNotFound&amp;#x3a; The object did not exist</ns6:Message>\n    <ns6:RequestId>fff29544-8039-499f-91c5-b3c9e4e3d8b1</ns6:RequestId>\n</ns6:ResponseError>\n"}}}},"500":{"description":"&nbsp; The default assignee is absent, invalid or inactive. <br> &nbsp; It returns a response body with the ErrorCode \"AbsentDefaultAssignee\" or \"InvalidDefaultAssignee\" when the default assignee is invalid or inactive.\n","content":{"application/json":{"example":{"ErrorCode":"AbsentDefaultAssignee","Message":"Default assignee is absent. - Default assignee is absent.","ErrorDetail":[],"ValidationError":[]},"schema":{"type":"string"}}}}},"description":"Reassign the assignments of the first assignee id to the assignee with the second id. <br> The assignees can be users or teams. <br> The assignments will be updated if: <ul>\n  <li>the current user is regular and the assignments are assigned to him or his teams </li>\n  <li>the current user is queue manager and and the assignments have an assignee in the current branch or child branches</li>\n  <li>the current user is in the same branch as the reassignee</li>\n</ul>\n","operationId":"put-rest-external-assignments-assignees-from_assigneeid-reassignees-to_assigneeid","parameters":[],"x-annotation-dx-category":"assignments-reassign","summary":"reassign user assignments","tags":["dx-category--assignments-reassign"]}},"/rest/external/assignments/{id}/logs":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"An UUID representing the assignment id."}],"get":{"responses":{"200":{"description":"Successfully returns the assignment by id and all its assignmentLogs. <br> ModifiedBy field shows the last user that has changed the status of an assignment. The user id is taken from the request context.\n","content":{"application/json":{"example":{"id":"a60b2008-8872-4620-8ed2-410ce5640fb9","subjectId":"360b2008-8872-4620-8ed2-410ce5640fb0","app":"APVerification","createdBy":"260b2008-8872-4620-8ed2-410ce5640fb3","assigneeIds":["12067d82-1308-4fd1-9d0b-12eafe99c4cd"],"companyId":"3fba6061-b51e-49bb-8c08-6cf6d28a304a","tags":["A tag","Another tag"],"type":"A type","createdAt":"2018-10-25T16:40:31.795+03:00","modifiedAt":"2018-10-25T16:40:31.795+03:00","outcome":"An outcome","status":"CLOSED","externalId":"External-Id","modifiedBy":"12067d82-1308-4fd1-9d0b-12eafe99c4cd","comment":"A comment","assignmentLogs":[{"id":9,"outcome":"An outcome","status":"CLOSED","comment":"A comment","externalId":"External-Id","modifiedBy":"12067d82-1308-4fd1-9d0b-12eafe99c4cd","assigneeIds":["12067d82-1308-4fd1-9d0b-12eafe99c4cd"],"tags":["A tag","Another tag"],"createdAt":"2018-10-25T16:40:57.497+03:00"},{"id":8,"outcome":"An outcome","status":"OPEN","comment":"A comment","externalId":"External-Id","modifiedBy":"12067d82-1308-4fd1-9d0b-12eafe99c4cd","assigneeIds":["12067d82-1308-4fd1-9d0b-12eafe99c4cd"],"createdAt":"2018-10-25T16:40:48.898+03:00"}],"context":{}},"schema":{"title":"Tradeshift Public API 1.0 - Assignment","required":["id","subjectId","type"],"type":"object","additionalProperties":false,"properties":{"id":{"pattern":"^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$","description":"String representation of an Universally unique identifier (UUID), version 5. See RFC 4122","type":"string"},"subjectId":{"pattern":"^.{1,255}$","type":"string"},"app":{"pattern":"^.{1,255}$","type":"string"},"createdBy":{"pattern":"^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$","description":"String representation of an Universally unique identifier (UUID), version 5. See RFC 4122","type":"string"},"assigneeIds":{"minItems":1,"uniqueItems":true,"type":"array","additionalProperties":false,"items":{"pattern":"^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$","description":"String representation of an Universally unique identifier (UUID), version 5. See RFC 4122","type":"string"}},"companyId":{"pattern":"^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$","description":"String representation of an Universally unique identifier (UUID), version 5. See RFC 4122","type":"string"},"tags":{"minItems":0,"uniqueItems":true,"type":"array","additionalProperties":false,"items":{"type":"string"}},"type":{"pattern":"^.{1,255}$","type":"string"},"comment":{"type":"string"},"externalId":{"pattern":"^.{1,255}$","type":"string"},"outcome":{"type":"string"},"status":{"type":"string"},"modifiedBy":{"pattern":"^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$","description":"String representation of an Universally unique identifier (UUID), version 5. See RFC 4122","type":"string"},"createdAt":{"pattern":"^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}(\\.\\d{3})?(Z|(\\+|\\-)[0-9]{2}:[0-9]{2})","description":"ISO8601 formatted DateTime in UTC timezone, fx 2014-12-09T16:11:53Z with optionally .001 for milliseconds.","type":"string"},"modifiedAt":{"pattern":"^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}(\\.\\d{3})?(Z|(\\+|\\-)[0-9]{2}:[0-9]{2})","description":"ISO8601 formatted DateTime in UTC timezone, fx 2014-12-09T16:11:53Z with optionally .001 for milliseconds.","type":"string"},"assignmentLogs":{"minItems":0,"uniqueItems":true,"type":"array","items":{"type":"object","properties":{"id":{"type":"integer"},"outcome":{"type":"string"},"externalId":{"pattern":"^.{1,255}$","type":"string"},"status":{"type":"string"},"comment":{"type":"string"},"tags":{"minItems":0,"uniqueItems":true,"type":"array","additionalProperties":false,"items":{"type":"string"}},"createdAt":{"pattern":"^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}(\\.\\d{3})?(Z|(\\+|\\-)[0-9]{2}:[0-9]{2})","description":"ISO8601 formatted DateTime in UTC timezone, fx 2014-12-09T16:11:53Z with optionally .001 for milliseconds.","type":"string"}},"required":["id","outcome","externalId","status","comment","tags","createdAt"]}},"context":{"type":"object"},"delegations":{"uniqueItems":true,"type":"array","items":{"required":["delegator","delegatee"],"type":"object","properties":{"delegator":{"pattern":"^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$","description":"String representation of an Universally unique identifier (UUID), version 5. See RFC 4122","type":"string"},"delegatee":{"pattern":"^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$","description":"String representation of an Universally unique identifier (UUID), version 5. See RFC 4122","type":"string"},"delegatorType":{"type":"string"}}}}}}}}},"401":{"description":""},"403":{"description":"Current user does not have access to assignment","content":{"application/json":{"schema":{"type":"string"}}}},"404":{"description":"","content":{"text/xml":{"schema":{"example":"<ns6:ResponseError xmlns:cec=\"urn:oasis:names:specification:ubl:schema:xsd:CommonExtensionComponents-2\"\n                   xmlns:cac=\"urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2\"\n                   xmlns:cbc=\"urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2\"\n                   xmlns:ns6=\"http://tradeshift.com/api/1.0\"\n                   xmlns:ns20=\"urn:oasis:names:specification:ubl:schema:xsd:OrderResponseSimple-2\"\n                   xmlns:ns8=\"urn:oasis:names:specification:ubl:schema:xsd:ApplicationResponse-2\"\n                   xmlns:ns7=\"http://tradeshift.com/api/2.0\"\n                   xmlns:ns13=\"urn:oasis:names:specification:ubl:schema:xsd:CreditNote-2\"\n                   xmlns:ns9=\"urn:oasis:names:specification:ubl:schema:xsd:OrderCancellation-2\"\n                   xmlns:ns12=\"urn:oasis:names:specification:ubl:schema:xsd:Quotation-2\"\n                   xmlns:ns11=\"urn:oasis:names:specification:ubl:schema:xsd:Invoice-2\"\n                   xmlns:ns22=\"urn:oasis:names:specification:ubl:schema:xsd:RequestForQuotation-2\"\n                   xmlns:ns10=\"urn:oasis:names:specification:ubl:schema:xsd:DespatchAdvice-2\"\n                   xmlns:ns21=\"urn:oasis:names:specification:ubl:schema:xsd:OrderResponse-2\"\n                   xmlns:ns17=\"urn:oasis:names:specification:ubl:schema:xsd:RemittanceAdvice-2\"\n                   xmlns:ns16=\"urn:oasis:names:specification:ubl:schema:xsd:Reminder-2\"\n                   xmlns:ns15=\"urn:oasis:names:specification:ubl:schema:xsd:OrderChange-2\"\n                   xmlns:ns14=\"urn:oasis:names:specification:ubl:schema:xsd:Order-2\"\n                   xmlns:ns19=\"urn:oasis:names:specification:ubl:schema:xsd:Catalogue-2\"\n                   xmlns:ts=\"http://tradeshift.com/api/public/1.0\"\n                   xmlns:ns18=\"urn:oasis:names:specification:ubl:schema:xsd:ReceiptAdvice-2\">\n    <ns6:ErrorCode>ResourceNotFound</ns6:ErrorCode>\n    <ns6:Message>Error&amp;#x3a; ResourceNotFound&amp;#x3a; The object did not exist</ns6:Message>\n    <ns6:RequestId>fff29544-8039-499f-91c5-b3c9e4e3d8b1</ns6:RequestId>\n</ns6:ResponseError>\n"}}}}},"description":"Get an assignment by id with all its logs. The assignment will be visible if: <ul>\n  <li>the current user is regular and the assignment is assigned to him or his teams </li>\n  <li>the current user is queue manager and and the assignment has an assignee in the current branch or child branches</li>\n</ul>\n","operationId":"get-rest-external-assignments-id-logs","parameters":[],"x-annotation-dx-category":"assignments-logs","summary":"get assignment logs","tags":["dx-category--assignments-logs"]}},"/rest/external/assignments/subjects/{subjectId}/logs":{"parameters":[{"name":"subjectId","in":"path","required":true,"schema":{"type":"string"},"description":"A string representing a subject id ( usually a document UUID )."}],"get":{"responses":{"200":{"description":"Successfully returns the assignments with all their logs. <br> ModifiedBy field shows the last user that has changed the status of an assignment. The user id is taken from the request context.\n","content":{"application/json":{"example":{"total":1,"items":[{"id":"a60b2008-8872-4620-8ed2-410ce5640fb9","subjectId":"360b2008-8872-4620-8ed2-410ce5640fb0","app":"APVerification","createdBy":"260b2008-8872-4620-8ed2-410ce5640fb3","assigneeIds":["12067d82-1308-4fd1-9d0b-12eafe99c4cd"],"companyId":"3fba6061-b51e-49bb-8c08-6cf6d28a304a","tags":["A tag","Another tag"],"type":"A type","createdAt":"2018-10-25T16:40:31.795+03:00","modifiedAt":"2018-10-25T16:40:31.795+03:00","externalId":"External-Id","outcome":"An outcome","status":"CLOSED","modifiedBy":"12067d82-1308-4fd1-9d0b-12eafe99c4cd","comment":"A comment","assignmentLogs":[{"id":9,"outcome":"An outcome","status":"CLOSED","externalId":"External-Id","comment":"A comment","modifiedBy":"12067d82-1308-4fd1-9d0b-12eafe99c4cd","assigneeIds":["12067d82-1308-4fd1-9d0b-12eafe99c4cd"],"tags":["A tag","Another tag"],"createdAt":"2018-10-25T16:40:57.497+03:00"},{"id":8,"outcome":"An outcome","status":"OPEN","comment":"A comment","externalId":"External-Id","modifiedBy":"12067d82-1308-4fd1-9d0b-12eafe99c4cd","assigneeIds":["12067d82-1308-4fd1-9d0b-12eafe99c4cd"],"createdAt":"2018-10-25T16:40:48.898+03:00"}],"context":{}}],"empty":false,"firstItem":{"id":"a60b2008-8872-4620-8ed2-410ce5640fb9","subjectId":"360b2008-8872-4620-8ed2-410ce5640fb0","app":"APVerification","createdBy":"260b2008-8872-4620-8ed2-410ce5640fb3","assigneeIds":["12067d82-1308-4fd1-9d0b-12eafe99c4cd"],"companyId":"3fba6061-b51e-49bb-8c08-6cf6d28a304a","tags":["A tag","Another tag"],"type":"A type","createdAt":"2018-10-25T16:40:31.795+03:00","modifiedAt":"2018-10-25T16:40:31.795+03:00","outcome":"An outcome","status":"CLOSED","externalId":"External-Id","modifiedBy":"12067d82-1308-4fd1-9d0b-12eafe99c4cd","comment":"A comment","assignmentLogs":[{"id":9,"outcome":"An outcome","status":"CLOSED","comment":"A comment","externalId":"External-Id","modifiedBy":"12067d82-1308-4fd1-9d0b-12eafe99c4cd","assigneeIds":["12067d82-1308-4fd1-9d0b-12eafe99c4cd"],"createdAt":"2018-10-25T16:40:57.497+03:00"},{"id":8,"outcome":"An outcome","status":"OPEN","comment":"A comment","externalId":"External-Id","modifiedBy":"12067d82-1308-4fd1-9d0b-12eafe99c4cd","assigneeIds":["12067d82-1308-4fd1-9d0b-12eafe99c4cd"],"createdAt":"2018-10-25T16:40:48.898+03:00"}],"context":{}}},"schema":{"title":"Tradeshift Public API 1.0 - Assignments","required":["total","items","empty"],"type":"object","additionalProperties":false,"properties":{"total":{"minimum":0,"description":"The number of assignments returned for the query","type":"integer"},"items":{"minItems":0,"uniqueItems":true,"type":"array","additionalProperties":false,"items":{"required":["id","subjectId","type"],"type":"object","properties":{"id":{"pattern":"^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$","description":"String representation of an Universally unique identifier (UUID), version 5. See RFC 4122","type":"string"},"subjectId":{"pattern":"^.{1,255}$","type":"string"},"app":{"pattern":"^.{1,255}$","type":"string"},"createdBy":{"pattern":"^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$","description":"String representation of an Universally unique identifier (UUID), version 5. See RFC 4122","type":"string"},"assigneeIds":{"minItems":1,"uniqueItems":true,"type":"array","additionalProperties":false,"items":{"pattern":"^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$","description":"String representation of an Universally unique identifier (UUID), version 5. See RFC 4122","type":"string"}},"companyId":{"pattern":"^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$","description":"String representation of an Universally unique identifier (UUID), version 5. See RFC 4122","type":"string"},"tags":{"minItems":0,"uniqueItems":true,"type":"array","additionalProperties":false,"items":{"type":"string"}},"type":{"pattern":"^.{1,255}$","type":"string"},"modifiedBy":{"pattern":"^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$","description":"String representation of an Universally unique identifier (UUID), version 5. See RFC 4122","type":"string"},"createdAt":{"pattern":"^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}(\\.\\d{3})?(Z|(\\+|\\-)[0-9]{2}:[0-9]{2})","description":"ISO8601 formatted DateTime in UTC timezone, fx 2014-12-09T16:11:53Z with optionally .001 for milliseconds.","type":"string"},"externalId":{"pattern":"^.{1,255}$","type":"string"},"modifiedAt":{"pattern":"^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}(\\.\\d{3})?(Z|(\\+|\\-)[0-9]{2}:[0-9]{2})","description":"ISO8601 formatted DateTime in UTC timezone, fx 2014-12-09T16:11:53Z with optionally .001 for milliseconds.","type":"string"},"assignmentLogs":{"minItems":0,"uniqueItems":true,"type":"array","items":{"type":"object","properties":{"id":{"type":"integer"},"outcome":{"type":"string"},"externalId":{"pattern":"^.{1,255}$","type":"string"},"status":{"type":"string"},"comment":{"type":"string"},"tags":{"minItems":0,"uniqueItems":true,"type":"array","additionalProperties":false,"items":{"type":"string"}},"createdAt":{"pattern":"^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}(\\.\\d{3})?(Z|(\\+|\\-)[0-9]{2}:[0-9]{2})","description":"ISO8601 formatted DateTime in UTC timezone, fx 2014-12-09T16:11:53Z with optionally .001 for milliseconds.","type":"string"}},"required":["id","outcome","externalId","status","comment","tags","createdAt"]}},"context":{"type":"object"},"delegations":{"uniqueItems":true,"type":"array","items":{"required":["delegator","delegatee"],"type":"object","properties":{"delegator":{"pattern":"^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$","description":"String representation of an Universally unique identifier (UUID), version 5. See RFC 4122","type":"string"},"delegatee":{"pattern":"^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$","description":"String representation of an Universally unique identifier (UUID), version 5. See RFC 4122","type":"string"},"delegatorType":{"type":"string"}}}}}}},"empty":{"type":"boolean"},"firstItem":{"required":["id","subjectId","type"],"type":"object","properties":{"id":{"pattern":"^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$","description":"String representation of an Universally unique identifier (UUID), version 5. See RFC 4122","type":"string"},"subjectId":{"pattern":"^.{1,255}$","type":"string"},"app":{"pattern":"^.{1,255}$","type":"string"},"createdBy":{"pattern":"^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$","description":"String representation of an Universally unique identifier (UUID), version 5. See RFC 4122","type":"string"},"assigneeIds":{"minItems":1,"uniqueItems":true,"type":"array","additionalProperties":false,"items":{"pattern":"^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$","description":"String representation of an Universally unique identifier (UUID), version 5. See RFC 4122","type":"string"}},"companyId":{"pattern":"^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$","description":"String representation of an Universally unique identifier (UUID), version 5. See RFC 4122","type":"string"},"tags":{"minItems":0,"uniqueItems":true,"type":"array","additionalProperties":false,"items":{"type":"string"}},"type":{"pattern":"^.{1,255}$","type":"string"},"modifiedBy":{"pattern":"^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$","description":"String representation of an Universally unique identifier (UUID), version 5. See RFC 4122","type":"string"},"createdAt":{"pattern":"^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}(\\.\\d{3})?(Z|(\\+|\\-)[0-9]{2}:[0-9]{2})","description":"ISO8601 formatted DateTime in UTC timezone, fx 2014-12-09T16:11:53Z with optionally .001 for milliseconds.","type":"string"},"externalId":{"pattern":"^.{1,255}$","type":"string"},"modifiedAt":{"pattern":"^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}(\\.\\d{3})?(Z|(\\+|\\-)[0-9]{2}:[0-9]{2})","description":"ISO8601 formatted DateTime in UTC timezone, fx 2014-12-09T16:11:53Z with optionally .001 for milliseconds.","type":"string"},"assignmentLogs":{"minItems":0,"uniqueItems":true,"type":"array","items":{"type":"object","properties":{"id":{"type":"integer"},"outcome":{"type":"string"},"externalId":{"pattern":"^.{1,255}$","type":"string"},"status":{"type":"string"},"comment":{"type":"string"},"tags":{"minItems":0,"uniqueItems":true,"type":"array","additionalProperties":false,"items":{"type":"string"}},"createdAt":{"pattern":"^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}(\\.\\d{3})?(Z|(\\+|\\-)[0-9]{2}:[0-9]{2})","description":"ISO8601 formatted DateTime in UTC timezone, fx 2014-12-09T16:11:53Z with optionally .001 for milliseconds.","type":"string"}},"required":["id","outcome","externalId","status","comment","tags","createdAt"]}},"context":{"type":"object"},"delegations":{"uniqueItems":true,"type":"array","items":{"required":["delegator","delegatee"],"type":"object","properties":{"delegator":{"pattern":"^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$","description":"String representation of an Universally unique identifier (UUID), version 5. See RFC 4122","type":"string"},"delegatee":{"pattern":"^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$","description":"String representation of an Universally unique identifier (UUID), version 5. See RFC 4122","type":"string"},"delegatorType":{"type":"string"}}}}}}}}}}},"400":{"description":"The page number is negative.","content":{"application/json":{"example":{"ErrorCode":"BadRequest","Message":"An invalid request was made - Parameter 'page' cannot be negative","ErrorDetail":[{"Key":"message","Value":"Parameter 'page' cannot be negative."}],"ValidationError":[]},"schema":{"type":"string"}}}},"401":{"description":""},"404":{"description":"","content":{"text/xml":{"schema":{"example":"<ns6:ResponseError xmlns:cec=\"urn:oasis:names:specification:ubl:schema:xsd:CommonExtensionComponents-2\"\n                   xmlns:cac=\"urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2\"\n                   xmlns:cbc=\"urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2\"\n                   xmlns:ns6=\"http://tradeshift.com/api/1.0\"\n                   xmlns:ns20=\"urn:oasis:names:specification:ubl:schema:xsd:OrderResponseSimple-2\"\n                   xmlns:ns8=\"urn:oasis:names:specification:ubl:schema:xsd:ApplicationResponse-2\"\n                   xmlns:ns7=\"http://tradeshift.com/api/2.0\"\n                   xmlns:ns13=\"urn:oasis:names:specification:ubl:schema:xsd:CreditNote-2\"\n                   xmlns:ns9=\"urn:oasis:names:specification:ubl:schema:xsd:OrderCancellation-2\"\n                   xmlns:ns12=\"urn:oasis:names:specification:ubl:schema:xsd:Quotation-2\"\n                   xmlns:ns11=\"urn:oasis:names:specification:ubl:schema:xsd:Invoice-2\"\n                   xmlns:ns22=\"urn:oasis:names:specification:ubl:schema:xsd:RequestForQuotation-2\"\n                   xmlns:ns10=\"urn:oasis:names:specification:ubl:schema:xsd:DespatchAdvice-2\"\n                   xmlns:ns21=\"urn:oasis:names:specification:ubl:schema:xsd:OrderResponse-2\"\n                   xmlns:ns17=\"urn:oasis:names:specification:ubl:schema:xsd:RemittanceAdvice-2\"\n                   xmlns:ns16=\"urn:oasis:names:specification:ubl:schema:xsd:Reminder-2\"\n                   xmlns:ns15=\"urn:oasis:names:specification:ubl:schema:xsd:OrderChange-2\"\n                   xmlns:ns14=\"urn:oasis:names:specification:ubl:schema:xsd:Order-2\"\n                   xmlns:ns19=\"urn:oasis:names:specification:ubl:schema:xsd:Catalogue-2\"\n                   xmlns:ts=\"http://tradeshift.com/api/public/1.0\"\n                   xmlns:ns18=\"urn:oasis:names:specification:ubl:schema:xsd:ReceiptAdvice-2\">\n    <ns6:ErrorCode>ResourceNotFound</ns6:ErrorCode>\n    <ns6:Message>Error&amp;#x3a; ResourceNotFound&amp;#x3a; The object did not exist</ns6:Message>\n    <ns6:RequestId>fff29544-8039-499f-91c5-b3c9e4e3d8b1</ns6:RequestId>\n</ns6:ResponseError>\n"}}}}},"description":"Get a paged list of assignments with all their logs, filtered by subject id which usually is a document id. <br> The assignments will be visible if: <ul>\n  <li>the current user is regular and the assignments are assigned to him or his teams </li>\n  <li>the current user is queue manager and and the assignments have an assignee in the current branch or child branches</li>\n</ul>\n","operationId":"get-rest-external-assignments-subjects-subjectid-logs","parameters":[{"name":"page","in":"query","description":"Number representing the page to be return from the paginated result-set.","schema":{"default":0,"type":"integer"}},{"name":"limit","in":"query","description":"The number of assignments displayed per page.","schema":{"default":20,"type":"integer"}}],"x-annotation-dx-category":"assignments-logs","summary":"get assignments by subjectid","tags":["dx-category--assignments-logs"]}},"/rest/external/suppliermanagement/documents":{"get":{"responses":{"200":{"description":"A (possibly empty) page of document meta-data. The total count may be an estimate.","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"documentId":{"pattern":"^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$","example":"da8fffc5-1738-49f4-b882-e0f7c19a4175","type":"string"},"accountingSystemId":{"type":"string"},"branchId":{"type":"string"},"documentProfileId":{"enum":["nes.p5.creditnote.ubl.2.1.dk","nes.p5.creditnote.ubl.2.1.gb","nes.p5.creditnote.ubl.2.1.ie","nes.p5.invoice.ubl.2.1.dk","nes.p5.invoice.ubl.2.1.gb","nes.p5.invoice.ubl.2.1.ie","tradeshift.creditnote.1.0","tradeshift.creditnote.ubl.1.0","tradeshift.invoice.1.0","tradeshift.invoice.ubl.1.0","tradeshift.remittanceadvice.1.0","tradeshift.remittanceadvice.ubl.1.0","tradeshift.status.1.0","tradeshift.status.ubl.1.0","ubl.creditnote.2.1.at","ubl.creditnote.2.1.ch","ubl.creditnote.2.1.de","ubl.creditnote.2.1.fi","ubl.creditnote.2.1.fr","ubl.creditnote.2.1.nl","ubl.creditnote.2.1.pl","ubl.creditnote.2.1.pr","ubl.creditnote.2.1.sg","ubl.creditnote.2.1.us","ubl.invoice.2.1.at","ubl.invoice.2.1.ch","ubl.invoice.2.1.cn","ubl.invoice.2.1.de","ubl.invoice.2.1.fi","ubl.invoice.2.1.fr","ubl.invoice.2.1.jp","ubl.invoice.2.1.nl","ubl.invoice.2.1.pl","ubl.invoice.2.1.pr","ubl.invoice.2.1.sg","ubl.invoice.2.1.us"],"type":"string"},"externalDocumentId":{"type":"string"},"created":{"type":"integer"},"state":{"enum":["IMPORTED","DRAFT","DISPATCHING","DISPATCHED","FAILED"],"type":"string"},"receivedDocumentId":{"pattern":"^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$","example":"da8fffc5-1738-49f4-b882-e0f7c19a4175","type":"string"},"documentType":{"enum":["CREDITNOTE","INVOICE","REMITTANCEADVICE","STATUS"],"type":"string"},"dispatched":{"type":"integer"},"documentReferences":{"type":"array","items":{"type":"object","properties":{"documentReference":{"type":"string"}},"required":["documentReference"]}},"sourceRef":{"type":"string"}},"required":["documentId","accountingSystemId","branchId","documentProfileId","externalDocumentId","created","state","receivedDocumentId","documentType","dispatched","documentReferences","sourceRef"]}},"total":{"type":"integer"}},"required":["items","total"]}}}}},"description":"Get an overview of all the documents the buyer has staged for its suppliers -\noptionally filtered to match the chosen parameters.\nSince there can be millions of documents, the results can be paginated. If the\ntotal number of rows matching the filter parameters is large, the total count\nin the result is an estimate and may deviate significantly from the actual value.\n","operationId":"get-rest-external-suppliermanagement-documents","parameters":[{"name":"accountingSystemId","in":"query","description":"Identifier of the supplier, which this document relates to, as it was used in the SMD.","schema":{"type":"string"}},{"name":"branchId","in":"query","description":"Internal identifier of the buyer branch, which this document relates to,\nas it has been configured on the platform.\n","schema":{"type":"string"}},{"name":"state","in":"query","description":"The state of the document in Buyer Sourced Documents","schema":{"enum":["IMPORTED","DRAFT","DISPATCHING","DISPATCHED","FAILED"],"type":"string"}},{"name":"documentType","in":"query","description":"The type of the document","schema":{"enum":["CREDITNOTE","INVOICE","REMITTANCEADVICE","STATUS"],"type":"string"}},{"name":"externalDocumentId","in":"query","description":"Unique identifier to the customer. It can be a customer-generated UUID, an ERP document ID,\nor an ID from a scanning solution. The external ID must also be present in the actual UBL\nof invoices and credit notes in the file ID reference.\n","schema":{"type":"string"}},{"name":"page","in":"query","description":"The page of responses to get","schema":{"default":0,"minimum":0,"type":"integer"}},{"name":"size","in":"query","description":"The size of the page","schema":{"default":100,"minimum":1,"maximum":100000,"type":"integer"}},{"name":"orderBy","in":"query","description":"We currently only support ordering the documents by `created`, but that might change in the future.\nThe ordering is specified after a colon `:`. By default, we order ascending (`asc`).\n","schema":{"default":"created","pattern":"^(created)(\\:(asc|desc))?$","type":"string"}}],"x-annotation-dx-category":"bsd-documents","summary":"Search documents","tags":["dx-category--bsd-documents"]},"post":{"responses":{"201":{"description":""},"400":{"description":"Document validation has failed.","content":{"application/json":{"schema":{"type":"object","properties":{"errorCode":{"type":"string"},"message":{"type":"string"},"errorDetail":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"value":{"type":"string"}},"required":["key","value"]}},"validationError":{"type":"array","items":{"type":"object","properties":{"errorCode":{"type":"string"},"subErrorCode":{"type":"string"},"errorDetail":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"value":{"type":"string"}},"required":["key","value"]}},"index":{"type":"integer"},"message":{"type":"string"}},"required":["errorCode","subErrorCode","errorDetail","index","message"]}}},"required":["errorCode","message","errorDetail","validationError"]}}}},"409":{"description":"Document already exists."}},"description":"Stage a new historical document for being loaded into a suppliers history, when they onboard.","operationId":"post-rest-external-suppliermanagement-documents","requestBody":{"content":{"application/xml":{"schema":{"type":"string"}}},"required":true},"parameters":[{"name":"accountingSystemId","in":"query","required":true,"description":"Identifier of the supplier, which this document relates to, as it was used in the SMD.","schema":{"type":"string"}},{"name":"branchId","in":"query","required":true,"description":"Internal identifier of the buyer branch, which this document relates to, as it has been configured on the\nplatform.\n","schema":{"type":"string"}},{"name":"documentProfileId","in":"query","required":true,"description":"The UBL document profile of the posted document.","schema":{"enum":["nes.p5.creditnote.ubl.2.1.dk","nes.p5.creditnote.ubl.2.1.gb","nes.p5.creditnote.ubl.2.1.ie","nes.p5.invoice.ubl.2.1.dk","nes.p5.invoice.ubl.2.1.gb","nes.p5.invoice.ubl.2.1.ie","tradeshift.creditnote.1.0","tradeshift.creditnote.ubl.1.0","tradeshift.invoice.1.0","tradeshift.invoice.ubl.1.0","tradeshift.remittanceadvice.1.0","tradeshift.remittanceadvice.ubl.1.0","tradeshift.status.1.0","tradeshift.status.ubl.1.0","ubl.creditnote.2.1.at","ubl.creditnote.2.1.ch","ubl.creditnote.2.1.de","ubl.creditnote.2.1.fi","ubl.creditnote.2.1.fr","ubl.creditnote.2.1.nl","ubl.creditnote.2.1.pl","ubl.creditnote.2.1.pr","ubl.creditnote.2.1.sg","ubl.creditnote.2.1.us","ubl.invoice.2.1.at","ubl.invoice.2.1.ch","ubl.invoice.2.1.cn","ubl.invoice.2.1.de","ubl.invoice.2.1.fi","ubl.invoice.2.1.fr","ubl.invoice.2.1.jp","ubl.invoice.2.1.nl","ubl.invoice.2.1.pl","ubl.invoice.2.1.pr","ubl.invoice.2.1.sg","ubl.invoice.2.1.us"],"type":"string"}},{"name":"externalDocumentId","in":"query","required":true,"description":"Identifier of the invoice the document relates to. I.e. if the document is an invoice, then it can be\nits own invoice number.\n","schema":{"type":"string"}},{"name":"documentReferenceId","in":"query","description":"Identifier (externalDocumentId) of a document that current document refers to. I.e. if the document is\nan application response, then it can have a documentReferenceId that points to an invoice.\nStaging an application response without supplying a documentReferenceId is considered an error.\n","schema":{"type":"string"}},{"name":"sourceRef","in":"query","description":"Customer reference to where the documents were sourced from.\n","schema":{"type":"string"}}],"x-annotation-dx-category":"bsd-documents","summary":"Load document","tags":["dx-category--bsd-documents"]}},"/rest/external/suppliermanagement/documents/{externalDocumentId}":{"parameters":[{"name":"externalDocumentId","in":"path","required":true,"schema":{"type":"string"},"description":"The external identifier of the document. I.e. if the document is an invoice, then it can be its own invoice\nnumber.\n"}],"get":{"responses":{"200":{"description":"Document metadata succesfully retrieved.","content":{"application/json":{"schema":{"type":"object","properties":{"documentId":{"pattern":"^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$","example":"da8fffc5-1738-49f4-b882-e0f7c19a4175","type":"string"},"accountingSystemId":{"type":"string"},"branchId":{"type":"string"},"documentProfileId":{"enum":["nes.p5.creditnote.ubl.2.1.dk","nes.p5.creditnote.ubl.2.1.gb","nes.p5.creditnote.ubl.2.1.ie","nes.p5.invoice.ubl.2.1.dk","nes.p5.invoice.ubl.2.1.gb","nes.p5.invoice.ubl.2.1.ie","tradeshift.creditnote.1.0","tradeshift.creditnote.ubl.1.0","tradeshift.invoice.1.0","tradeshift.invoice.ubl.1.0","tradeshift.remittanceadvice.1.0","tradeshift.remittanceadvice.ubl.1.0","tradeshift.status.1.0","tradeshift.status.ubl.1.0","ubl.creditnote.2.1.at","ubl.creditnote.2.1.ch","ubl.creditnote.2.1.de","ubl.creditnote.2.1.fi","ubl.creditnote.2.1.fr","ubl.creditnote.2.1.nl","ubl.creditnote.2.1.pl","ubl.creditnote.2.1.pr","ubl.creditnote.2.1.sg","ubl.creditnote.2.1.us","ubl.invoice.2.1.at","ubl.invoice.2.1.ch","ubl.invoice.2.1.cn","ubl.invoice.2.1.de","ubl.invoice.2.1.fi","ubl.invoice.2.1.fr","ubl.invoice.2.1.jp","ubl.invoice.2.1.nl","ubl.invoice.2.1.pl","ubl.invoice.2.1.pr","ubl.invoice.2.1.sg","ubl.invoice.2.1.us"],"type":"string"},"externalDocumentId":{"type":"string"},"created":{"type":"integer"},"state":{"enum":["IMPORTED","DRAFT","DISPATCHING","DISPATCHED","FAILED"],"type":"string"},"receivedDocumentId":{"pattern":"^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$","example":"da8fffc5-1738-49f4-b882-e0f7c19a4175","type":"string"},"documentType":{"enum":["CREDITNOTE","INVOICE","REMITTANCEADVICE","STATUS"],"type":"string"},"dispatched":{"type":"integer"},"documentReferences":{"type":"array","items":{"type":"object","properties":{"documentReference":{"type":"string"}},"required":["documentReference"]}},"sourceRef":{"type":"string"}},"required":["documentId","accountingSystemId","branchId","documentProfileId","externalDocumentId","created","state","receivedDocumentId","documentType","dispatched","documentReferences","sourceRef"]}}}},"404":{"description":"Document does not exist."}},"description":"Get one document's metadata\n","operationId":"get-rest-external-suppliermanagement-documents-externaldocumentid","x-annotation-dx-category":"bsd-documents","summary":"Get Document Metadata","tags":["dx-category--bsd-documents"]},"put":{"responses":{"201":{"description":""},"400":{"description":"Document validation has failed.","content":{"application/json":{"schema":{"type":"object","properties":{"errorCode":{"type":"string"},"message":{"type":"string"},"errorDetail":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"value":{"type":"string"}},"required":["key","value"]}},"validationError":{"type":"array","items":{"type":"object","properties":{"errorCode":{"type":"string"},"subErrorCode":{"type":"string"},"errorDetail":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"value":{"type":"string"}},"required":["key","value"]}},"index":{"type":"integer"},"message":{"type":"string"}},"required":["errorCode","subErrorCode","errorDetail","index","message"]}}},"required":["errorCode","message","errorDetail","validationError"]}}}}},"description":"Stage a new historical document for being loaded into a suppliers history, when they onboard.\nAlready existing invoice or credit note with the same externalDocumentId and state IMPORTED will be archived.\n","operationId":"put-rest-external-suppliermanagement-documents-externaldocumentid","requestBody":{"content":{"application/xml":{"schema":{"type":"string"}}},"required":true},"parameters":[{"name":"accountingSystemId","in":"query","required":true,"description":"Identifier of the supplier, which this document relates to, as it was used in the SMD.","schema":{"type":"string"}},{"name":"branchId","in":"query","required":true,"description":"Internal identifier of the buyer branch, which this document relates to, as it has been configured on the\nplatform.\n","schema":{"type":"string"}},{"name":"documentProfileId","in":"query","required":true,"description":"The UBL document profile of the posted document.","schema":{"enum":["nes.p5.creditnote.ubl.2.1.dk","nes.p5.creditnote.ubl.2.1.gb","nes.p5.creditnote.ubl.2.1.ie","nes.p5.invoice.ubl.2.1.dk","nes.p5.invoice.ubl.2.1.gb","nes.p5.invoice.ubl.2.1.ie","tradeshift.creditnote.1.0","tradeshift.creditnote.ubl.1.0","tradeshift.invoice.1.0","tradeshift.invoice.ubl.1.0","tradeshift.remittanceadvice.1.0","tradeshift.remittanceadvice.ubl.1.0","tradeshift.status.1.0","tradeshift.status.ubl.1.0","ubl.creditnote.2.1.at","ubl.creditnote.2.1.ch","ubl.creditnote.2.1.de","ubl.creditnote.2.1.fi","ubl.creditnote.2.1.fr","ubl.creditnote.2.1.nl","ubl.creditnote.2.1.pl","ubl.creditnote.2.1.pr","ubl.creditnote.2.1.sg","ubl.creditnote.2.1.us","ubl.invoice.2.1.at","ubl.invoice.2.1.ch","ubl.invoice.2.1.cn","ubl.invoice.2.1.de","ubl.invoice.2.1.fi","ubl.invoice.2.1.fr","ubl.invoice.2.1.jp","ubl.invoice.2.1.nl","ubl.invoice.2.1.pl","ubl.invoice.2.1.pr","ubl.invoice.2.1.sg","ubl.invoice.2.1.us"],"type":"string"}},{"name":"documentReferenceId","in":"query","description":"Identifier (externalDocumentId) of a document that current document refers to. I.e. if the document is\nan application response, then it can have a documentReferenceId that points to an invoice.\nStaging an application response without supplying a documentReferenceId is considered an error.\n","schema":{"type":"string"}},{"name":"sourceRef","in":"query","description":"Customer reference to where the documents were sourced from.\n","schema":{"type":"string"}}],"x-annotation-dx-category":"bsd-documents","summary":"Load/Override Document","tags":["dx-category--bsd-documents"]},"delete":{"responses":{"204":{"description":"Document was permanently archived."},"400":{"description":"Document was not successfully archived."}},"description":"Permanently archives the document.\n","operationId":"delete-rest-external-suppliermanagement-documents-externaldocumentid","x-annotation-dx-category":"bsd-documents","summary":"Archive Document","tags":["dx-category--bsd-documents"]}},"/rest/external/suppliermanagement/documents/{externalDocumentId}/redispatch":{"parameters":[{"name":"externalDocumentId","in":"path","required":true,"schema":{"type":"string"},"description":"The external identifier of the document. I.e. if the document is an invoice, then it can be its own invoice\nnumber.\n"}],"post":{"responses":{"204":{"description":"Document state successfully set to IMPORTED"},"400":{"description":"Document is either not in state FAILED or does not exist"}},"description":"Retry the dispatch of a failed document by setting its state to IMPORTED.\nThe document will the asynchronously be picked up for dispatch again.\n","operationId":"post-rest-external-suppliermanagement-documents-externaldocumentid-redispatch","x-annotation-dx-category":"bsd-documents","summary":"Redispatch Document","tags":["dx-category--bsd-documents"]}},"/rest/external/suppliermanagement/documents/{externalDocumentId}/content":{"parameters":[{"name":"externalDocumentId","in":"path","required":true,"schema":{"type":"string"},"description":"The external identifier of the document. I.e. if the document is an invoice, then it can be its own invoice\nnumber.\n"}],"get":{"responses":{"200":{"description":"Document content successfully retrieved."},"400":{"description":"Document does not exist."}},"description":"Retrieve document content.\n","operationId":"get-rest-external-suppliermanagement-documents-externaldocumentid-content","x-annotation-dx-category":"bsd-documents","summary":"Get Document Content","tags":["dx-category--bsd-documents"]}},"/rest/external/suppliermanagement/documents/{externalDocumentId}/states":{"parameters":[{"name":"externalDocumentId","in":"path","required":true,"schema":{"type":"string"},"description":"The external identifier of the document. I.e. if the document is an invoice, then it can be its own invoice\nnumber.\n"}],"get":{"responses":{"200":{"description":"Document state changes successfully retrieved.","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"state":{"enum":["IMPORTED","DRAFT","DISPATCHING","DISPATCHED","FAILED"],"type":"string"},"created":{"type":"string","format":"date-time"},"error":{"type":"object","properties":{"errorCode":{"type":"string"},"message":{"type":"string"},"errorDetail":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"value":{"type":"string"}},"required":["key","value"]}},"validationError":{"type":"array","items":{"type":"object","properties":{"errorCode":{"type":"string"},"subErrorCode":{"type":"string"},"errorDetail":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"value":{"type":"string"}},"required":["key","value"]}},"index":{"type":"integer"},"message":{"type":"string"}},"required":["errorCode","subErrorCode","errorDetail","index","message"]}}},"required":["errorCode","message","errorDetail","validationError"]}},"required":["state","created","error"]}}},"required":["items"]}}}},"400":{"description":"Document does not exist."}},"description":"Retrieve information about document states changes.\n","operationId":"get-rest-external-suppliermanagement-documents-externaldocumentid-states","x-annotation-dx-category":"bsd-documents","summary":"Get Document State Changes","tags":["dx-category--bsd-documents"]}},"/rest/external/suppliermanagement/documents/{externalDocumentId}/references":{"parameters":[{"name":"externalDocumentId","in":"path","required":true,"schema":{"type":"string"},"description":"The external identifier of the document. I.e. if the document is an invoice, then it can be its own invoice\nnumber.\n"}],"get":{"responses":{"200":{"description":"Document References successfully retrieved."},"404":{"description":"Document does not exist."}},"description":"Retrieve List Of Document References\n","operationId":"get-rest-external-suppliermanagement-documents-externaldocumentid-references","x-annotation-dx-category":"bsd-documents","summary":"Get Document References","tags":["dx-category--bsd-documents"]}},"/rest/external/document-validation/validation/validate-document":{"put":{"tags":["Document Validation","dx-category--document-validation-validate_document"],"summary":"Validate document","description":"Validate a document by testing matching validators, optionally specifying a category to filter the validator groups that are applied. Only the validator groups for the provided document type are run.","operationId":"put-rest-external-document-validation-validation-validate-document","parameters":[{"name":"senderTenantId","in":"query","description":"UUID of the user company (tenant) that is sending the document. This can be different than the 'tenantId' header value, for example when checking on behalf of a branch. The sender tenant id is used to obtain the connection properties of the connection between the receiver and sender, or other sender related settings.","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"receiverTenantId","in":"query","description":"UUID of the company (tenant) that will receive the document. The receiver tenant is used to check the validators of the receiver when the receiver company has configured validation for other companies sending documents (for example 'sellers' sending invoices to a 'buyer'), to obtain the connection properties of the connection between the receiver and sender, to obtain the country compliance validator groups of the receiver if enabled, or other receiver related settings.","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"documentId","in":"query","description":"Optional document id to validate, if provided the document content body is ignored.","required":false,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"content":{"application/xml":{"schema":{"type":"array","description":"Optional document content in UBL XML format that will be tested against the validators. Only checked if documentId parameter is not provided. If documentId parameter is provided, this is ignored.","items":{"type":"string","format":"byte"}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationResult"}}}}}}},"/rest/external/document-validation/validation/groups/{groupId}":{"get":{"tags":["Document Validation","dx-category--document-validation-validators_find"],"summary":"Gets a validator group","description":"Gets a validator group definition","operationId":"get-rest-external-document-validation-validation-groups-groupid","parameters":[{"name":"groupId","in":"path","description":"UUID of the validator group to get","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GroupDef"}}}}}},"put":{"tags":["Document Validation","dx-category--document-validation-validators_save"],"summary":"Save validator group","description":"Creates or updates a validator group definition","operationId":"put-rest-external-document-validation-validation-groups-groupid","parameters":[{"name":"groupId","in":"path","description":"UUID of the validator group to create or update","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"description":"Validator group definition in JSON format","content":{"application/json":{"schema":{"type":"object"},"example":{"tenantId":"cb555bf8-0949-4857-acf3-03aef59c00ec","documentType":"Invoice","countryCompliance":{"countryCode":"RO"},"connectionProperty":{"key":"SupplierCategory","value":"DO"},"validators":[{"type":"pattern","dispatchRestriction":"Hard","context":"/Invoice/cac:InvoiceLine","field":"cac:OrderLineReference/cac:OrderReference/cbc:ID","pattern":"^\\d+$","multiValueMatchBehavior":"AnyMatch","message":"ID must contain only numbers"},{"type":"minLength","dispatchRestriction":"Soft","field":"/Invoice/cbc:ID","minLength":5,"message":"ID must have minimum 5 characters"}]}}},"required":true},"responses":{"200":{"description":"Successfully updated validator group definition"},"201":{"description":"Created a new validator group definition"}}},"delete":{"tags":["Document Validation","dx-category--document-validation-validators_delete"],"summary":"Delete validator group","description":"Permanently deletes a validator group definition","operationId":"delete-rest-external-document-validation-validation-groups-groupid","parameters":[{"name":"groupId","in":"path","description":"UUID of the validator group to delete","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"204":{"description":"No Content"}}}},"/rest/external/document-validation/validation/groups/{groupId}/history":{"get":{"tags":["Document Validation","dx-category--document-validation-validators_history"],"summary":"Get change history","description":"Gets the validator group change history, including current definition.","operationId":"get-rest-external-document-validation-validation-groups-groupid-history","parameters":[{"name":"groupId","in":"path","description":"UUID of the validator group to get","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/GroupDefHistory"}}}}}}}},"/rest/external/document-validation/validation/groups":{"get":{"tags":["Document Validation","dx-category--document-validation-validators_find_all"],"summary":"List Validator Groups","description":"List validator groups for the tenant, optionally filtering by document type or connection property","operationId":"get-rest-external-document-validation-validation-groups","parameters":[{"name":"senderTenantId","in":"query","description":"UUID of the user company (tenant) that is sending the document. This can be different than the 'tenantId' header value, for example when checking on behalf of a branch. The sender tenant id is used to obtain the connection properties of the connection between the receiver and sender, or other sender related settings.","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"receiverTenantId","in":"query","description":"UUID of the company (tenant) that will receive the document. The receiver tenant is used to check the validators of the receiver when the receiver company has configured validation for other companies sending documents (for example 'sellers' sending invoices to a 'buyer'), to obtain the connection properties of the connection between the receiver and sender, to obtain the country compliance validator groups of the receiver if enabled, or other receiver related settings.","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"documentType","in":"query","description":"Optional document type filter. If not provided, validators with any document type will be returned","required":false,"schema":{"type":"string","enum":["ApplicationResponse","AttachedDocument","AwardedNotification","BillOfLading","BusinessCard","CallForTenders","Catalogue","CatalogueDeletion","CatalogueItemSpecificationUpdate","CataloguePricingUpdate","CatalogueRequest","CertificateOfOrigin","ContractAwardNotice","ContractNotice","CreditNote","DebitNote","DespatchAdvice","DigitalAgreement","DigitalCapability","DocumentStatus","DocumentStatusRequest","Enquiry","EnquiryResponse","ExceptionCriteria","ExceptionNotification","ExpressionOfInterestRequest","ExpressionOfInterestResponse","Forecast","ForecastRevision","ForwardingInstructions","FreightInvoice","FulfilmentCancellation","GoodsItemItinerary","GuaranteeCertificate","InstructionForReturns","InventoryReport","Invoice","ItemInformationRequest","Order","OrderCancellation","OrderChange","OrderResponse","OrderResponseSimple","PackingList","PriorInformationNotice","ProductActivity","QualificationApplicationRequest","QualificationApplicationResponse","Quotation","ReceiptAdvice","Reminder","RemittanceAdvice","RequestForQuotation","RetailEvent","SelfBilledCreditNote","SelfBilledInvoice","Statement","StockAvailabilityReport","Tender","TenderContract","TenderReceipt","TenderStatus","TenderStatusRequest","TenderWithdrawal","TendererQualification","TendererQualificationResponse","TradeItemLocationProfile","TransportExecutionPlan","TransportExecutionPlanRequest","TransportProgressStatus","TransportProgressStatusRequest","TransportServiceDescription","TransportServiceDescriptionRequest","TransportationStatus","TransportationStatusRequest","UnawardedNotification","UnsubscribeFromProcedureRequest","UnsubscribeFromProcedureResponse","UtilityStatement","Waybill","WeightStatement"]}},{"name":"countryComplianceCode","in":"query","description":"Optional country code used to list by specific country compliance rules. If not provided, it is determined from the country of the receiver (receiverTenantId) if enabled on receiver.To list all country compliance validator groups use the special value 'ALL'.To list all the groups of the receiver but without the country compliance ones, even if defined and enabled, use the special value 'NONE'.","required":false,"schema":{"type":"object","properties":{"countryCode":{"type":"string"}}}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/GroupDefWithId"}}}}}}}}},"servers":[{"url":"https://api.tradeshift.com/tradeshift"}],"tags":[{"name":"dx-category--document-coding--coding-completeness","description":"Document coding entries"},{"name":"dx-category--document-coding--coding-validation-v1","description":"Document coding entries"},{"name":"dx-category--document-coding--coding-validation","description":"Document coding entries"},{"name":"dx-category--document-extensibility","description":"Document extensibility points"},{"name":"dx-category--overview-introduction","description":"This is the developer documentation for the Tradeshift API. The Tradeshift API is REST based and allows integrators to handle a number of resources for tasks such as managing business documents, retrieving sender and receiver information, and dispatching documents to receivers."},{"name":"dx-category--overview-make_a_request","description":"The easiest way to get started working with the Tradeshift API is to create OAuth credentials by activating the [API Access to Own Account](https://sandbox.tradeshift.com/#/apps/Tradeshift.AppStore/apps/Tradeshift.APIAccessToOwnAccount) app. The app will display your credentials as four values: a consumer key, a consumer secret, a token, and a token secret. Copy these to a secure location so you can access them later.\n\nWe recommend using an app like [Postman](https://www.getpostman.com/apps) to easily explore the API. The OAuth 1.0 credentails you just created can then be added to Postman as [explained in their docs](https://www.getpostman.com/docs/postman/sending_api_requests/authorization#oauth-10). To summarize:\n\n- Select \"OAuth 1.0\" from the \"Type\" dropdown on the \"Authorization\" tab\n- Select \"Request Headers\" from the \"Add authorization data to\" dropdown\n- Enter your consumer key, consumer secret, access token and token secret\n- Select \"HMAC-SHA1\" from the \"Signature Method\" dropdown\n- Leave the other fields blank\n- Switch to the \"Headers\" tab and add the \"Accept: application/json\"\n\nTo confirm you have it setup correctly, make a request to `GET https://api-sandbox.tradeshift.com/tradeshift/rest/external/account/info` and you should get back information about your company.\n\n### Authentication in Apps\n\nFor your app to make API calls as a user, you'll use the 3-legged OAuth 2 flow to authenticate. Read about [OAuth2 and how to set it up](/docs/guides/oauth)."},{"name":"dx-category--overview-building_blocks","description":"Tradeshift apps support collaboration and document exchange among networked companies and individual users. Accounts (companies and users), network, and documents are the building blocks of the Tradeshift app platform.\n\n### Account/Company\n\nAn account represents a company that can exchange business documents with other companies. Accounts are also called companies or company accounts to be differentiated from individual users. An account can be characterized by its account info and branch structure. An account can have multiple users.\n\n#### Branches\n\nTradeshift supports a 2-level hierarchy that allows an account to have child accounts. When accounts are linked according to some master-children relationship, these linked accounts are also called branches.\n\n#### Master branch/Master account\n\nAn administrative account used to organize child accounts belonging to the same organization, e.g., ABC Global Enterprise master branch. Any account technically can be a master branch as long as it is not already another account's child branch.\n\n#### Child branch/Child account\n\nAn account that belongs to a master branch, e.g., ABC Global Enterprise USA Division child branch. Any account technically can be a child branch as long as it is not already another account's master branch.\n\n#### Account info\n\nThis would typically include attributes such as name, address, country, tax IDs, etc.\n\n#### Users\n\nUsers must be created within a company account. When a user logs in, the user is inside a company account and can access documents and information in that account. If created within a master branch, the user can switch between child branches that belong to the same master branch. If created within a child branch, the user can not switch to other branches.\n\n#### User info\n\nMeant to include name, email, spend limits, reporting relationship, etc.\n\n### Network\n\nThe collection of accounts connected to each other in a multiple-to-multiple relationship. All accounts on Tradeshift collectively form the Tradeshift network. Meanwhile, each account can invite its business partners to join its own network (similar to how social network websites work).\n\n#### Connections\n\nA link between two accounts. A connection needs to be active for the two connected accounts to exchange documents. To establish a connection, an account must send a connection request to another account, and the other account must accept the connection request.\n\n#### External connection\n\nThis is also colloquially known as _manual connection_ - a placeholder account you created for the business partner you want to connect with. You filled out the account's profile including name, email address, etc. The business partner has not accepted the connection request, or activated its account yet. You may still update the account's information such as name and email. Generally, an external connection is temporary. Once the business partner activates the placeholder account, the connection turns into a Tradeshift connection. You will no longer be able to change the account profile information.\n\n#### Tradeshift connection\n\nThis is also colloquially known as _active connection_ - the company invited to connect has accepted invitation. The invited company is ready to send and receive documents. The invited company owns its account info such as name and email. You may not change their account info.\n\n#### Connection property\n\nSelf-defined properties to characterize a connection. For example, a buyer company may store its internal vendor ID as a connection property on each supplier connection. Symmetrically, the supplier company on the other side may store its internal customer ID as a connection property.\n\n#### Groups\n\nAn account’s own created groups to categorize connections. Naming and definition is determined by the account. E.g., a buyer company may have suppliers in two groups: suppliers required to have purchase orders, and suppliers not required to have purchase orders.\n\n### Documents/ Document files\n\nBusiness documents exchanged between companies in such business transactions as tendering, quotation, buying, shipping, invoicing, and so on.\n\n#### UBL\n\nA library of standard electronic XML business documents such as purchase orders and invoices. This is the preferred standard document format used on Tradeshift. The standards are developed by OASIS (Organization for the Advancement of Structured Information Standards). For more information, see <https://www.oasis-open.org/committees/ubl>.\n\n#### TSUBL\n\nTSUBL includes a subset of documents under UBL 2.0 standards. [Download](http://tradeshift.com/wp-content/uploads/TSUBL_20190213.zip) the TSUBL specifications and sample files, or go to <http://integrate.tradeshift.com> and click \"UBL\" in the \"Supported formats\" section.\n\n#### Tenant Isolation\n\nNo direct sharing of data between tenants (accounts). There is storage associated with each account. When sending a document, a copy of the sender's document is created and rendered in the receiver's account. Therefore, there is no direct sharing of data between tenants. Depending on the context, actions on one copy of the document may or may not affect the other copy. For example:\n\n- A supplier (sender) deleting a sent invoice will make that invoice disappear in the supplier's account. However, the buyer (receiver) can still see that invoice in the buyer's account because the buyer's copy of that invoice is not affected. In this case, action on the sender's copy of the invoice does not affect the receiver's copy.\n- A buyer (receiver) updates the status of a received invoice to \"Accepted\". This will trigger a status message to the supplier (sender) account to update the supplier's copy of the invoice to \"Accepted\". In this case, action on receiver's copy of the invoice automatically affects the sender's copy."},{"name":"dx-category--overview-key_concepts","description":"- REST API: the Tradeshift API is based on HTTPS, REST, and OAuth. It allows developers to use HTTP PUT/POST/GET/DELETE to access \"resources\" such as dispatching documents, creating users, and connecting with other accounts. It is used by both Tradeshift and third-party developers.\n- OAuth: Tradeshift supports OAuth1 (deprecated, backward compatibility only) and OAuth2 for developers to obtain permissions to access user resources. For more on OAuth, see <http://oauth.net/>.\n- UUID: universally unique identifier that is used to identify entities on Tradeshift. According to Wikipedia, UUID is an identifier standard used in software construction. Tradeshift uses a canonical format using hexadecimal text with inserted hyphen characters, e.g., de305d54-75b4-431b-adb2-eb6b9e546014. There are Javascript and free websites that can generate UUIDs. For example, <https://www.uuidgenerator.net/> and <https://github.com/kelektiv/node-uuid>\n- Standards: Tradeshift follows standards where it is applicable for codes such as country code, currency code, tax code, etc. Developers need to use the same codes when using Tradeshift documents or parameters. Here is a list of standards (not exhaustive) that Tradeshift follows. For the complete set of standards and values, see the [TSUBL specifications](http://tradeshift.com/wp-content/uploads/TSUBL_20190213.zip), or go to <http://integrate.tradeshift.com>.\n- Currency code: ISO 4217. Example: USD for US dollars.\n- Country code: ISO 3166. Example: US for United States.\n- Tax category: UN/ECE 5305. Example: Z for zero rated goods\n- Tax scheme: UN/ECE 5153 Subset. Example: STT for state/provincial sales tax.\n- Units of measure: UN/ECE rec 20. Example: EA for each."},{"name":"Document Validation","description":"Manages document validators"},{"name":"Company Configuration","description":"Manages document validation related company configuration"},{"name":"Document Clearance and Validation Migration","description":"Manages migration to Caspian related operations"},{"name":"Document Validation and Clearance","description":"Manages validation and clearance common related operations"},{"name":"Clearance Administration","description":"Manages clearance administrative related operations"},{"name":"Document","description":"Manages document related operations"},{"name":"Document Clearance","description":"Manages clearance related operations"}]}