AgreementResource Resource

GET /agreements

Returns all agreements optionally filtered by one or more available filtering options.

Request Parameters
name type description
agreementIds query a String holding one or more SerialAgreement ids (separated by comma) which results are to be filtered by.
libraryIds query a String holding one or more SerialLibrary ids (separated by comma) which results are to be filtered by. This filtering is based on the libraries which the original publisher taking part in the agreement is associated with.
Request Body
media type data type
application/xml anyType (XML)
Response Codes
code condition
200 Zero or more agreements were returned.
500 An error occured.
Response Body
media type data type description
application/xml;charset=utf-8 (custom) zero or more SerialAgreement.

Example

Request
GET /agreements
Content-Type: application/xml
Accept: application/xml;charset=utf-8

                
...
                
              
Response
HTTP/1.1 200 OK
Content-Type: application/xml;charset=utf-8

                
...
                
              

POST /agreements

Creates an agreement. Regardless of the provided state of the fields id and updated, these fields will be automatically populated upon creation.

Request Body
media type data type description
application/xml MTAgreement (XML) the SerialAgreement which is to be created.
Response Codes
code condition
200 The agreement was created.
500 An error occured.
Response Body
media type data type description
application/xml;charset=utf-8 (custom) the created SerialAgreement.

Example

Request
POST /agreements
Content-Type: application/xml
Accept: application/xml;charset=utf-8

                
<agreement>
  <comment>...</comment>
  <name>...</name>
  <originalPublisher>
    <id>...</id>
    <ipi>...</ipi>
    <originalPublisherLibraryRelationships>
      <originalPublisherLibraryRelationship>
        <id>...</id>
        <library/>
        <originalPublisher/>
        <updated>...</updated>
      </originalPublisherLibraryRelationship>
    </originalPublisherLibraryRelationships>
    <name>...</name>
    <society>
      <name>...</name>
      <id>...</id>
      <updated>...</updated>
    </society>
    <updated>...</updated>
  </originalPublisher>
  <originalPublisherShare>...</originalPublisherShare>
  <subPublisherShare>...</subPublisherShare>
  <societyRelationships>
    <societyRelationship>
      <agreement/>
      <id>...</id>
      <name>...</name>
      <number>...</number>
      <society>
        <name>...</name>
        <id>...</id>
        <updated>...</updated>
      </society>
      <status>...</status>
      <subPublisher>
        <id>...</id>
        <ipi>...</ipi>
        <name>...</name>
        <updated>...</updated>
      </subPublisher>
      <subStatus>...</subStatus>
      <updated>...</updated>
    </societyRelationship>
  </societyRelationships>
  <id>...</id>
  <updated>...</updated>
</agreement>

                
              
Response
HTTP/1.1 200 OK
Content-Type: application/xml;charset=utf-8

                
...
                
              

DELETE /agreements/{agreementId}

Deletes an agreement.

Request Parameters
name type description
agreementId path a String holding an id which represents the agreement which is to be deleted.
Response Codes
code condition
204 The agreement was deleted.
404 The agreement does not exist.
500 An error occured.

Example

Request
DELETE /agreements/{agreementId}
Content-Type: */*

                
...
                
              
Response
HTTP/1.1 204 No Content

              

PUT /agreements/{agreementId}

Updates an agreement.

Request Parameters
name type description
agreementId path a String holding an id which represents the agreement which is to be updated.
Request Body
media type data type description
application/xml MTAgreement (XML) the SerialAgreement which is to be updated.
Response Codes
code condition
200 The agreement was updated.
400 The resource ID does not match the payload ID.
404 The agreement does not exist.
409 The agreement has been updated or deleted by another process.
500 An error occured.
Response Body
media type data type description
application/xml;charset=utf-8 (custom) the updated SerialAgreement.

Example

Request
PUT /agreements/{agreementId}
Content-Type: application/xml
Accept: application/xml;charset=utf-8

                
<agreement>
  <comment>...</comment>
  <name>...</name>
  <originalPublisher>
    <id>...</id>
    <ipi>...</ipi>
    <originalPublisherLibraryRelationships>
      <originalPublisherLibraryRelationship>
        <id>...</id>
        <library/>
        <originalPublisher/>
        <updated>...</updated>
      </originalPublisherLibraryRelationship>
    </originalPublisherLibraryRelationships>
    <name>...</name>
    <society>
      <name>...</name>
      <id>...</id>
      <updated>...</updated>
    </society>
    <updated>...</updated>
  </originalPublisher>
  <originalPublisherShare>...</originalPublisherShare>
  <subPublisherShare>...</subPublisherShare>
  <societyRelationships>
    <societyRelationship>
      <agreement/>
      <id>...</id>
      <name>...</name>
      <number>...</number>
      <society>
        <name>...</name>
        <id>...</id>
        <updated>...</updated>
      </society>
      <status>...</status>
      <subPublisher>
        <id>...</id>
        <ipi>...</ipi>
        <name>...</name>
        <updated>...</updated>
      </subPublisher>
      <subStatus>...</subStatus>
      <updated>...</updated>
    </societyRelationship>
  </societyRelationships>
  <id>...</id>
  <updated>...</updated>
</agreement>

                
              
Response
HTTP/1.1 200 OK
Content-Type: application/xml;charset=utf-8

                
...