Share via


Agreement

 

Important

Microsoft Azure BizTalk Services (MABS) is being retired, and replaced with Azure Logic Apps. If you currently use MABS, then Move from BizTalk Services to Logic Appsprovides some guidance on moving your integration solutions to Logic Apps.

If you're brand new to Logic Apps, then we suggest getting started here:

An Agreement entity encapsulates agreement information between two business profiles.

  • Agreement Entity Properties

  • Create an Agreement

  • List Agreements

  • Update an Agreement

  • Delete an Agreement

  • Link Other Entities with Agreements

  • Delete Link between Other Entities and Agreements

Agreement Entity Properties

Property

Type

Description

ID

Int

Specifies a unique ID for the agreement. This value is auto-generated.

Name

String

Required. Specifies a unique name for the agreement. This must not be more than 256 characters.

ProtocolName

String

Required. Set this to X12 for an X12 agreement or AS2 for an AS2 agreement. This value must not be more than 256 characters and is case-insensitive.

Description

String

Required. Specifies a description for the agreement. This value must not be more than 512 characters.

EnabledInternal

Bool

Required. Specifies whether the agreement is enabled or not.

StartDateInternal

DateTime

Specifies the start date for the agreement.

EndDateInternal

DateTime

Specifies the end date for the agreement.

Contacts

DataServiceCollection<Contact>

A navigation property that references the contact information associated with an agreement.

CustomSettings

DataServiceCollection<CustomSetting>

Required. A navigation property that references custom information associated with an agreement.

Partnership

Partnership

Required. A navigation property that references the partnerships this agreement is part of.

OnewayAgreementBtoA

OnewayAgreement

Required. A navigation property that references the receive side agreement.

OnewayAgreementAtoB

OnewayAgreement

Required. A navigation property that references the send side agreement.

BusinessProfileA

BusinessProfile

Required. A navigation property that references the sender profile.

BusinessProfileB

BusinessProfile

Required. A navigation property that references the receiver profile.

SendProtocolSettings

ProtocolSettings

Required. A navigation property that references the protocol settings associated with the sender’s profile.

ReceiveProtocolSettings

ProtocolSettings

Required. A navigation property that references the protocol settings associated with the receiver’s profile.

Version

Byte[]

This value is auto-generated and is for internal use only.

Considerations

An agreement must not be deleted if it is already deployed. Also, if an agreement that was previously deployed using the BizTalk Services Portal is updated using the REST API, the already deployed agreement will be out of sync with the newly deployed agreement.

Create an Agreement

You can create an agreement using a POST HTTP request.

Method

Request URI

HTTP Version

POST

https://mybiztalkservice.biztalk.windows.net/default/$PartnerManagement/Agreements

HTTP/1.1

Note

You cannot create an agreement without linking it to partnerships and business profiles. In the following sample request, a partnership and business profiles are linked to an agreement using the <link> element of the request body.

Sample Request

POST https://mybiztalkservice.biztalk.windows.net/default/$PartnerManagement/Agreements HTTP/1.1
Accept-Charset: UTF-8
DataServiceVersion: 1.0;NetFx
MaxDataServiceVersion: 3.0;NetFx
Accept: application/atom+xml,application/xml
Authorization: WRAP access_token="<token>"
x-ms-version: 1.0
Host: integration.zurich.test.dnsdemo1.com:5446

<?xml version="1.0" encoding="utf-8"?><entry xmlns="https://www.w3.org/2005/Atom" xmlns:d="https://schemas.microsoft.com/ado/2007/08/dataservices" xmlns:m="https://schemas.microsoft.com/ado/2007/08/dataservices/metadata">
  <category term="Microsoft.ApplicationServer.Integration.PartnerManagement.Agreement" scheme="https://schemas.microsoft.com/ado/2007/08/dataservices/scheme" />
  <link rel="https://schemas.microsoft.com/ado/2007/08/dataservices/related/Partnership" type="application/atom+xml;type=entry" title="Partnership" href="https://integration.zurich.test.dnsdemo1.com:5446/test01/$PartnerManagement/Partnerships(1)" />
  <link rel="https://schemas.microsoft.com/ado/2007/08/dataservices/related/BusinessProfileA" type="application/atom+xml;type=entry" title="BusinessProfileA" href="https://integration.zurich.test.dnsdemo1.com:5446/test01/$PartnerManagement/BusinessProfiles(1)" />
  <link rel="https://schemas.microsoft.com/ado/2007/08/dataservices/related/BusinessProfileB" type="application/atom+xml;type=entry" title="BusinessProfileB" href="https://integration.zurich.test.dnsdemo1.com:5446/test01/$PartnerManagement/BusinessProfiles(2)" />
  <id />
  <title />
  <updated>2013-02-06T05:41:33Z</updated>
  <author>
    <name />
  </author>
  <content type="application/xml">
    <m:properties>
      <d:Description m:null="true" />
      <d:EnabledInternal m:type="Edm.Boolean">true</d:EnabledInternal>
      <d:EndDateInternal m:type="Edm.DateTime">2099-01-01T00:00:00</d:EndDateInternal>
      <d:Id m:type="Edm.Int32">0</d:Id>
      <d:Name>Agreement_594</d:Name>
      <d:ProtocolName>X12</d:ProtocolName>
      <d:StartDateInternal m:type="Edm.DateTime">2009-01-01T00:00:00</d:StartDateInternal>
      <d:Version m:type="Edm.Binary">AA==</d:Version>
    </m:properties>
  </content>
</entry>

List Agreements

You can list an agreement using a GET HTTP request.

Method

Request URI

HTTP Version

GET

https://mybiztalkservice.biztalk.windows.net/default/$PartnerManagement/Agreements

This returns all the business profiles

HTTP/1.1

GET

https://mybiztalkservice.biztalk.windows.net/default/$PartnerManagement/Agreements(id)

This returns information about the agreement with the specified ID.

HTTP/1.1

Sample Request

Retrieve all the profiles

GET https://mybiztalkservice.biztalk.windows.net/default/$PartnerManagement/Agreements HTTP/1.1
Accept-Charset: UTF-8
DataServiceVersion: 1.0;NetFx
MaxDataServiceVersion: 3.0;NetFx
Accept: application/atom+xml,application/xml
Authorization: WRAP access_token="<token>"
x-ms-version: 1.0
Host: integration.zurich.test.dnsdemo1.com:5446

Retrieve information about a specific agreement

GET https://mybiztalkservice.biztalk.windows.net/default/$PartnerManagement/Agreements(1) HTTP/1.1
Accept-Charset: UTF-8
DataServiceVersion: 1.0;NetFx
MaxDataServiceVersion: 3.0;NetFx
Accept: application/atom+xml,application/xml
Authorization: WRAP access_token="<token>"
x-ms-version: 1.0
Host: integration.zurich.test.dnsdemo1.com:5446

Update an Agreement

You can update an agreement using a MERGE HTTP request.

Method

Request URI

HTTP Version

MERGE

https://mybiztalkservice.biztalk.windows.net/default/$PartnerManagement/Agreements(id)

HTTP/1.1

Sample Request

MERGE https://mybiztalkservice.biztalk.windows.net/default/$PartnerManagement/Agreements(1) HTTP/1.1
Accept-Charset: UTF-8
DataServiceVersion: 1.0;NetFx
MaxDataServiceVersion: 3.0;NetFx
Accept: application/atom+xml,application/xml
Authorization: WRAP access_token="<token>"
x-ms-version: 1.0
Content-Type: application/atom+xml
If-Match: W/"X'00000000000007FD'"
Host: integration.zurich.test.dnsdemo1.com:5446
Expect: 100-continue

<?xml version="1.0" encoding="utf-8"?>
<entry xmlns="https://www.w3.org/2005/Atom" xmlns:d="https://schemas.microsoft.com/ado/2007/08/dataservices" xmlns:m="https://schemas.microsoft.com/ado/2007/08/dataservices/metadata">
  <id>https://integration.zurich.test.dnsdemo1.com:5446/test01/$PartnerManagement/Agreements(1)</id>
  <category term="Microsoft.ApplicationServer.Integration.PartnerManagement.Agreement" scheme="https://schemas.microsoft.com/ado/2007/08/dataservices/scheme" />
  <title />
  <updated>2013-02-06T06:24:07Z</updated>
  <author>
    <name />
  </author>
  <content type="application/xml">
    <m:properties>
      <d:Description m:null="true" />
      <d:EnabledInternal m:type="Edm.Boolean">true</d:EnabledInternal>
      <d:EndDateInternal m:type="Edm.DateTime">2099-01-01T00:00:00</d:EndDateInternal>
      <d:Id m:type="Edm.Int32">1</d:Id>
      <d:Name>New_Updated_Agreement</d:Name>
      <d:ProtocolName>X12</d:ProtocolName>
      <d:StartDateInternal m:type="Edm.DateTime">2009-01-01T00:00:00</d:StartDateInternal>
      <d:Version m:type="Edm.Binary">AAAAAAAAB/0=</d:Version>
    </m:properties>
  </content>
</entry>

Delete an Agreement

You can delete an agreement using a DELETE HTTP request.

Method

Request URI

HTTP Version

DELETE

https://mybiztalkservice.biztalk.windows.net/default/$PartnerManagement/Agreements(id)

HTTP/1.1

Sample Request

DELETE https://mybiztalkservice.biztalk.windows.net/default/$PartnerManagement/Agreements(1) HTTP/1.1
Accept-Charset: UTF-8
DataServiceVersion: 1.0;NetFx
MaxDataServiceVersion: 3.0;NetFx
Accept: application/atom+xml,application/xml
Authorization: WRAP access_token="<token>"
x-ms-version: 1.0
If-Match: W/"X'0000000000000836'"
Host: integration.zurich.test.dnsdemo1.com:5446
Content-Length: 0

In Create an Agreement section, we saw how to create a link between an agreement and a partnership, and an agreement and business profiles, while creating an agreement. In this section, we see how to create a link in the opposite direction, for example, from a partnership to an agreement. To create the link, the URI of the agreement must be included in the request body.

Method

Request URI

HTTP Version

POST

https://mybiztalkservice.biztalk.windows.net/default/$PartnerManagement/Partnerships(id)/$links/Agreements

Partnerships(id) denotes the ID of the partnership that links to the agreement

HTTP/1.1

Sample Request

The following sample message shows how to create a link from a Partnership entity to an Agreement entity. You can use similar request messages to create links from other entities (BusinessProfiles, Contact, etc.) to an Agreement entity.

POST https://mybiztalkservice.biztalk.windows.net/default/$PartnerManagement/Partnerships(1)/$links/Agreements HTTP/1.1
Accept-Charset: UTF-8
DataServiceVersion: 1.0;NetFx
MaxDataServiceVersion: 3.0;NetFx
x-ms-version: 1.0
Accept: application/atom+xml,application/xml
Authorization: WRAP access_token="<token>"
Content-Type: application/xml
Host: integration.zurich.test.dnsdemo1.com:5446
Expect: 100-continue

<?xml version="1.0" encoding="utf-8"?>
<uri xmlns="https://schemas.microsoft.com/ado/2007/08/dataservices/metadata">https://mybiztalkservice.biztalk.windows.net/default/$PartnerManagement/Agreements(1)</uri>

You can delete a link between other entities, for example a Partnership, and agreements using the HTTP DELETE method.

Method

Request URI

HTTP Version

DELETE

https://mybiztalkservice.biztalk.windows.net/default/$PartnerManagement/Partnerships(id)/$links/Agreements(id)

HTTP/1.1

Sample Request

The following sample message shows how to delete a link between a partnership and an agreement. You can use similar requests to delete links from other entities (BusinessProfiles, Contacts, etc.) and an agreement.

DELETE https://mybiztalkservice.biztalk.windows.net/default/$PartnerManagement/Partnerships(1)/$links/Agreements(1) HTTP/1.1
Accept-Charset: UTF-8
DataServiceVersion: 1.0;NetFx
MaxDataServiceVersion: 3.0;NetFx
x-ms-version: 1.0
Accept: application/atom+xml,application/xml
Authorization: WRAP access_token="<token>"
Content-Type: application/xml
Host: integration.zurich.test.dnsdemo1.com:5446
Expect: 100-continue

See Also

TPM OM API: Exposed Entities and Properties