Skip to main content
Solved

Invoice Rest Api integration

  • October 18, 2023
  • 4 replies
  • 528 views

Hello everyone 

i am do integrating Invoice Rest Api in my system and i want to send addresses as well but unable to find any filter or keyword to expand addresses please help me in it 

Best answer by jinin

Hi @orangzebbaloch,

I've attached a package with a sample endpoint. Please publish the package and review it.

Sample Request:

{

    "BillToAddress": {

        "AddressLine1": {

            "value": "77 W 66th St # 13"

        },

        "AddressLine2": {},

        "City": {

            "value": "New York"

        },

        "Country": {

            "value": "US"

        },

        "OverrideAddress": {

            "value": false

        },

        "PostalCode": {

            "value": "10023"

        },

        "State": {

            "value": "NY"

        }

    },

    "Customer": {

        "value": "ABCSTUDIOS"

    },

    "CustomerOrder": {

        "value": "ABCSTUDIOS20233-020"

    },

    "Date": {

        "value": "2023-02-16T00:00:00+05:30"

    },

    "Description": {

        "value": "Electronics - Drop Shipped Order"

    },

    "ShipToAddress": {

        "AddressLine1": {

            "value": "77 W 66th St # 13"

        },

        "AddressLine2": {},

        "City": {

            "value": "New York"

        },

        "Country": {

            "value": "US"

        },

        "Latitude": {},

        "Longitude": {},

        "OverrideAddress": {

            "value": false

        },

        "PostalCode": {

            "value": "10023"

        },

        "State": {

            "value": "NY"

        }

    },

    "ShipToContactOverride": {

        "value": false

    },

    "Status": {

        "value": "Open"

    },

    "TaxTotal": {

        "value": 0.0000

    },

    "Terms": {

        "value": "30D"

    },

    "Type": {

        "value": "Invoice"

    }

}

4 replies

jinin
Pro I
Forum|alt.badge.img+11
  • Pro I
  • October 18, 2023

HI @Orangzaib ,

By default, the address is not included in the Invoice entity. You should extend the entity to incorporate both the billing and shipping addresses.

Refer the below screenshot,

 


i did this but when i try to Access this trough Postman its giving me the error does it  take time to Create?

 


 


jinin
Pro I
Forum|alt.badge.img+11
  • Pro I
  • Answer
  • October 18, 2023

Hi @orangzebbaloch,

I've attached a package with a sample endpoint. Please publish the package and review it.

Sample Request:

{

    "BillToAddress": {

        "AddressLine1": {

            "value": "77 W 66th St # 13"

        },

        "AddressLine2": {},

        "City": {

            "value": "New York"

        },

        "Country": {

            "value": "US"

        },

        "OverrideAddress": {

            "value": false

        },

        "PostalCode": {

            "value": "10023"

        },

        "State": {

            "value": "NY"

        }

    },

    "Customer": {

        "value": "ABCSTUDIOS"

    },

    "CustomerOrder": {

        "value": "ABCSTUDIOS20233-020"

    },

    "Date": {

        "value": "2023-02-16T00:00:00+05:30"

    },

    "Description": {

        "value": "Electronics - Drop Shipped Order"

    },

    "ShipToAddress": {

        "AddressLine1": {

            "value": "77 W 66th St # 13"

        },

        "AddressLine2": {},

        "City": {

            "value": "New York"

        },

        "Country": {

            "value": "US"

        },

        "Latitude": {},

        "Longitude": {},

        "OverrideAddress": {

            "value": false

        },

        "PostalCode": {

            "value": "10023"

        },

        "State": {

            "value": "NY"

        }

    },

    "ShipToContactOverride": {

        "value": false

    },

    "Status": {

        "value": "Open"

    },

    "TaxTotal": {

        "value": 0.0000

    },

    "Terms": {

        "value": "30D"

    },

    "Type": {

        "value": "Invoice"

    }

}